Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To stop Angular from generating a unit test file when generating a component, you can use the command line option --skipTests when running the ng generate component command.

Here are the steps:

  1. Open your command prompt or terminal.
  2. Navigate to the project directory where you want to generate the component.
  3. Run the following command to generate the component without the unit test file:
ng generate component componentName --skipTests

Make sure to replace componentName with the name of your component.

This command will generate the component without the unit test file.