解决方式一:
node_modules/jasmine-core/lib/jasmine-core/jasmine.js
On line 668 I have change the value of maximumSpecCallbackDepth from 20 to 100.
|
|
解决方式二:
在首个单元测试文件加入:
|
|
解决方式三:
|
|
Instead, you could do the following, which will use a single injector and register your modules only once.
|
|
参考文档
Running more than 10 tests on karma using jasmine causes: “ERROR: Some of your tests did a full page reload!”
Some of your tests did a full page reload - error when running Jasmine tests
Some of your tests did a full page reload - error in Karma AngularJS
angularJS测试一 Karma Jasmine Mock
Angular (二) Jasmine单元测试和端到端测试