We maintain a high standard of quality through rigorous automated testing.
- Runner: Vitest
- Type Checking:
tsc(TypeScript Compiler) - Linting: ESLint
To run unit tests across the entire monorepo:
pnpm testTo run tests for a specific package:
pnpm --filter @forge-ts/cli testFor development, run tests in watch mode to get instant feedback:
pnpm --filter @forge-ts/cli test --watch- Location: Tests should be located alongside the source code they test, typically in
*.test.tsor*.spec.tsfiles, or in a detailed__tests__directory. - Structure: Use
describeblocks to group tests anditortestfor individual test cases. - Mocking: Use Vitest's mocking capabilities (
vi.mock) to isolate units under test.
All Pull Requests must pass the following gates:
- Build:
pnpm buildmust succeed. - Lint:
pnpm lintmust pass without errors. - Test:
pnpm testmust pass. - Typecheck:
pnpm typecheckmust pass.