我正在使用jasmine-node软件包,这是软件包文件的外观:
"jasmine-node": "^1.16.2"
现在要增加测试套件的超时时间,我正在这样做:
describe("methodname single test", function () {
var originalTimeout;
beforeEach(function() {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000;
});
it("make sure we don't get errors ", function (done) {
index.handler({},{},function(err, result){
if (err) console.log(err.message);
expect(err).toBeNull();
done();
});
});
afterEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});
});
但是运行此测试时仍会看到相同的结果:expect: timeout: timed out after 5000 msec waiting for spec to complete
timeout: timed out after 5000 msec waiting for spec to complete
有什么主意吗?