unit-testingangular-components

How to prevent angular from creating unit test file while generating component


Is there any command line argument that will help generating angular component but not create unit tests file


Solution

  • Based on the docs the nc generate component command has a --skip-tests flag:

    Do not create "spec.ts" test files for the new component.

    https://angular.io/cli/generate#component

    Example:

    ng generate component MyComponent --skip-tests