Running a single test file

后端 未结 10 565
囚心锁ツ
囚心锁ツ 2020-12-07 15:29

Is there a way to run ng test for a single file instead of for the entire test suite? Ideally, I\'d like to get the quickest possible feedback loop when I\'m e

10条回答
  •  再見小時候
    2020-12-07 15:54

    You can go to src/test.ts and can change the following line:

    const context = require.context('./', true, /\.spec\.ts$/);

    to

    const context = require.context('./', true, /**yourcomponent.component**\.spec\.ts$/);

提交回复
热议问题