Skip to content

Testing Guide

OpenCodeHub uses Vitest for unit testing and Playwright for end-to-end testing.

Terminal window
bun test
# or
npm test

This runs all tests located in src/**/*.test.ts.

Terminal window
npx playwright test

We encourage TDD. When adding a new feature:

  1. Create a feature.test.ts file.
  2. Write a failing test case.
  3. Implement the feature.
  4. Verify the test passes.