Karma run single test

后端 未结 9 1291
后悔当初
后悔当初 2020-11-28 11:33

I use karma for run tests. I have many tests and run all tests is very slow process. I want to run only single test in order to spend less time, because all test runs about

9条回答
  •  抹茶落季
    2020-11-28 12:03

    If you want to run karma test with angular, You just need to modify your test.ts file.

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

    If you want to run your.component.spec.ts modify line to: const context = require.context('./', true, /your\.component\.spec\.ts$/);

提交回复
热议问题