我正在编写一个karma单元测试脚本,一切看起来很好,但是出现了错误:
Chrome 39.0.2171 (Windows 7) Unit: common.services.PartialUpdater Should be loaded with all dependencies FAILED
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Chrome 39.0.2171 (Windows 7): Executed 4 of 4 (1 FAILED) (5.025 secs / 5.006 secs)
函数在哪里被调用:
describe("Unit: common.services.PartialUpdater", function() {
it("Should be loaded with all dependencies", function($rootScope) {
expect(true).toBe(true);
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
});
it("Should make a partial update when event is received", function() {
expect(true).toBe(true);
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
});
});
我不想增加jasme.default超时间隔,也不知道如何解决这个问题。有没有人遇到过这种问题并能提供一些经验?谢谢。