Skip to main content

Running Tests

# Run all tests (builds first)
pnpm test

# Run tests for a specific package
pnpm --filter @whilst/tenant-store test
pnpm --filter @whilst/web-app test

# Run with coverage
pnpm --filter @whilst/tenant-store test -- --coverage

Test Framework

Whilst uses Vitest for unit and integration tests. Each package has its own vitest.config.ts.

Linting & Type Checking

# Lint all packages
pnpm lint

# Type check all packages
pnpm typecheck

# Format code
pnpm format

Pre-Push Checklist

Before pushing changes:
  1. pnpm typecheck — must pass with zero errors
  2. pnpm build — if you changed build-time code
  3. pnpm test — all tests pass
  4. pnpm lint — no lint errors
  5. Update /CHANGELOG.md with your changes

E2E Tests

End-to-end tests use Playwright:
# Run Playwright tests
npx playwright test

# Run with UI mode
npx playwright test --ui

# View test report
npx playwright show-report
Configuration is in playwright.config.ts at the project root.