pnpm -w run test:allThis runs tests for all packages in the workspace:
- Main mdcode package (16 unit tests)
- Usage package (5 E2E tests) Total: 21 tests
Note: pnpm test only runs the mdcode unit tests. Use pnpm -w run test:all to run everything.
# Main mdcode package (unit tests)
pnpm --filter @gcm/mdcode test
# Usage package (E2E tests)
pnpm --filter @gcm/mdcode-usage test
cd packages/usage && pnpm test # Alternative- Root tests:
/tests/- Core functionality testsparser.test.ts- Markdown parsing and walking (8 tests)transform.test.ts- Transformer functionality (8 tests)
- E2E tests:
packages/usage/tests/e2e.test.ts- End-to-end integration (5 tests) - Example package:
packages/example/- No tests, just runnable examples
- Import paths from root tests must use
../packages/mdcode/src/... - ALWAYS test all packages - run
pnpm testfrom workspace root - E2E tests validate extract/update workflows with real files
pnpm -w run test:all- Ensure ALL 21 tests pass (mdcode + usage packages)pnpm build- Ensure build succeeds- Test examples - Manually run at least one example:
pnpm --filter @gcm/mdcode-example example:list pnpm --filter @gcm/mdcode-example example:extract
- Parser/core: Add to
/tests/parser.test.ts - Transform: Add to
/tests/transform.test.ts - E2E workflows: Add to
packages/usage/tests/e2e.test.ts - New commands: Add unit tests to root
/tests/or create new test file