Running a single test file

后端 未结 10 569
囚心锁ツ
囚心锁ツ 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:52

    You must have to go src/test.ts and can change the following line number code 18:

    //Then we find all the tests.
    const context = require.context('./', true, /\.spec\.ts$/);
    

    to

    //Then we find all the tests.
    const context = require.context('./', true, /testing.component\.spec\.ts$/);
    

提交回复
热议问题