Angular 6 + CLI (TypeScript) - How to stop generating .spec.ts test files

后端 未结 11 986
一向
一向 2020-12-13 05:52

I know it\'s kind of a bad practice, but bear with me:

I\'m using Angular-CLI, particularly ng g to generate all of my classes. However

11条回答
  •  借酒劲吻你
    2020-12-13 06:25

    you can add --skipTests=true|false if true it wont generate any spec.ts

    example : ng g component componentName --skipTests=true

    this line wont generate any spec.ts files

    EDIT:

    Note: As of angular 7 this command doesn't work, even though this command is mentioned on the official website of angular. Here: https://angular.io/cli/generate#component

提交回复
热议问题