Testing Guide
OpenCodeHub uses Vitest for unit testing and Playwright for end-to-end testing.
Running Unit Tests
Section titled “Running Unit Tests”bun test# ornpm testThis runs all tests located in src/**/*.test.ts.
Running E2E Tests
Section titled “Running E2E Tests”npx playwright testWriting Tests
Section titled “Writing Tests”We encourage TDD. When adding a new feature:
- Create a
feature.test.tsfile. - Write a failing test case.
- Implement the feature.
- Verify the test passes.