为什么我的茉莉花testing在DEFAULT_TIMEOUT_INTERVAL之前超时?

相关: 无法为茉莉花设置超时

Jasmine 2.4.1

我的testing报告由于超时而失败,即使超时值似乎大于所报告的时间。

我正在这样做:

 describe('tests content controller', function(){ beforeAll(function(done) { jasmine.DEFAULT_TIMEOUT_INTERVAL= 120000; //... }) fit('/content GET should return 200',function(done){ request(app) .get('/content') .set('Authorization', "bearer " + requestor.token) .set('Accept', 'application/json') .expect(200) .end(function (err, res) { console.log('timeout',jasmine.DEFAULT_TIMEOUT_INTERVAL); //prints 120000 if (err) done.fail(err); expect(res.statusCode).toBe(200); done(); }) }); 

然后这个testing失败,与:

 1) tests content controller /content GET should return 200 Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. at Timer.listOnTimeout [as ontimeout] (timers.js:110:15) Finished in 106.449 seconds 

106.449秒小于120秒,这是我的超时值似乎设置为。

那为什么这个testing失败?

我之前并没有打电话给我,这导致了这个错误。