Having trouble with jasmine 2 and getting async specs wired up:
define(['foo'], function(foo) {
return describe('foo', function() {
beforeEach(function(done) {
window.jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
return setTimeout((function() {
console.log('inside timeout');
return done();
}), window.jasmine.DEFAULT_TIMEOUT_INTERVAL);
});
return it('passes', function() {
return expect({}).toBeDefined();
});
});
});
When I run via karma, I get back
Error: Timeout - Async callback was not invoked within timeout
specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
and then the specs fail. I have attempted to override the default timeout but I can't get past the error
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…