Testing Locally
Running tests locally before pushing changes is essential. It provides immediate feedback, improves CI efficiency, and promotes quality ownership.
Benefits
- Immediate Feedback: Quickly identify and fix issues.
- CI Efficiency: Reduce the load on CI by catching issues early.
- Quality Ownership: Developers ensure their code meets quality standards.
Guidelines
Run tests locally using the following commands:
Unit Tests
Run either of these commands:
npx nx run <project>:test
npx nx test <project>
Examples:
npx nx run examples-with-adapters-and-transformer-module:test
npx nx test examples-with-adapters-and-transformer-module
Extension Usage
Plugins are available for popular IDEs:
Module Tests
Run either of these commands:
npx nx run <project>:e2e
npx nx e2e <project>
Examples:
npx nx run examples-with-adapters-and-transformer-module-e2e:e2e
npx nx e2e examples-with-adapters-and-transformer-module-e2e
Extension Usage
Plugins are available for popular IDEs:
E2E Tests
Headless Mode
npx nx run <project>:e2e
npx nx e2e <project>
Cypress Inspector Mode
npx nx run <project>:e2e --watch
npx nx e2e <project> --watch
Examples:
npx nx run example-e2e:e2e
npx nx e2e example-e2e --watch
Extension Usage
Plugins are available for popular IDEs: