Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.15 KB

File metadata and controls

42 lines (31 loc) · 1.15 KB

Testing Strategy

We maintain a high standard of quality through rigorous automated testing.

Test Stack

  • Runner: Vitest
  • Type Checking: tsc (TypeScript Compiler)
  • Linting: ESLint

Running Tests

Unit Tests

To run unit tests across the entire monorepo:

pnpm test

To run tests for a specific package:

pnpm --filter @forge-ts/cli test

Watch Mode

For development, run tests in watch mode to get instant feedback:

pnpm --filter @forge-ts/cli test --watch

Writing Tests

  • Location: Tests should be located alongside the source code they test, typically in *.test.ts or *.spec.ts files, or in a detailed __tests__ directory.
  • Structure: Use describe blocks to group tests and it or test for individual test cases.
  • Mocking: Use Vitest's mocking capabilities (vi.mock) to isolate units under test.

CI/CD Expectations

All Pull Requests must pass the following gates:

  1. Build: pnpm build must succeed.
  2. Lint: pnpm lint must pass without errors.
  3. Test: pnpm test must pass.
  4. Typecheck: pnpm typecheck must pass.