DubStack
Contributing

Testing

Writing and running tests for DubStack.

DubStack uses Vitest for testing.

Running Tests

pnpm test                    # Run all tests
pnpm test:coverage           # Run with coverage
pnpm --filter=dubstack test  # Run CLI tests only

Test Organization

  • Command tests: packages/cli/src/commands/*.test.ts
  • Library tests: packages/cli/src/lib/*.test.ts
  • Integration tests: packages/cli/test/**/*.test.ts

Writing Tests

Co-locate unit tests with their source files. Use the existing test patterns as a guide.

When behavior or output changes, add or update tests near the changed code. All three verification commands (pnpm test, pnpm typecheck, pnpm checks) must pass before work is considered complete.

On this page