Fixed flaky spec
This commit is contained in:
@@ -465,7 +465,7 @@ describe('Env integration', function() {
|
|||||||
|
|
||||||
var global = {
|
var global = {
|
||||||
setTimeout: function(fn, delay) {
|
setTimeout: function(fn, delay) {
|
||||||
setTimeout(fn, delay);
|
return setTimeout(fn, delay);
|
||||||
},
|
},
|
||||||
clearTimeout: function(fn, delay) {
|
clearTimeout: function(fn, delay) {
|
||||||
clearTimeout(fn, delay);
|
clearTimeout(fn, delay);
|
||||||
@@ -1018,7 +1018,7 @@ describe('Env integration', function() {
|
|||||||
var globalSetTimeout = jasmine
|
var globalSetTimeout = jasmine
|
||||||
.createSpy('globalSetTimeout')
|
.createSpy('globalSetTimeout')
|
||||||
.and.callFake(function(cb, t) {
|
.and.callFake(function(cb, t) {
|
||||||
setTimeout(cb, t);
|
return setTimeout(cb, t);
|
||||||
}),
|
}),
|
||||||
delayedFunctionForGlobalClock = jasmine.createSpy(
|
delayedFunctionForGlobalClock = jasmine.createSpy(
|
||||||
'delayedFunctionForGlobalClock'
|
'delayedFunctionForGlobalClock'
|
||||||
@@ -1033,7 +1033,7 @@ describe('Env integration', function() {
|
|||||||
setTimeout: globalSetTimeout,
|
setTimeout: globalSetTimeout,
|
||||||
clearTimeout: clearTimeout,
|
clearTimeout: clearTimeout,
|
||||||
setImmediate: function(cb) {
|
setImmediate: function(cb) {
|
||||||
setTimeout(cb, 0);
|
return setTimeout(cb, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1108,7 +1108,7 @@ describe('Env integration', function() {
|
|||||||
setInterval: setInterval,
|
setInterval: setInterval,
|
||||||
clearInterval: clearInterval,
|
clearInterval: clearInterval,
|
||||||
setImmediate: function(cb) {
|
setImmediate: function(cb) {
|
||||||
realSetTimeout(cb, 0);
|
return realSetTimeout(cb, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -2255,7 +2255,7 @@ describe('Env integration', function() {
|
|||||||
it('reports errors that occur during loading', function(done) {
|
it('reports errors that occur during loading', function(done) {
|
||||||
var global = {
|
var global = {
|
||||||
setTimeout: function(fn, delay) {
|
setTimeout: function(fn, delay) {
|
||||||
setTimeout(fn, delay);
|
return setTimeout(fn, delay);
|
||||||
},
|
},
|
||||||
clearTimeout: function(fn, delay) {
|
clearTimeout: function(fn, delay) {
|
||||||
clearTimeout(fn, delay);
|
clearTimeout(fn, delay);
|
||||||
@@ -2312,7 +2312,7 @@ describe('Env integration', function() {
|
|||||||
var originalOnerror = jasmine.createSpy('original onerror');
|
var originalOnerror = jasmine.createSpy('original onerror');
|
||||||
var global = {
|
var global = {
|
||||||
setTimeout: function(fn, delay) {
|
setTimeout: function(fn, delay) {
|
||||||
setTimeout(fn, delay);
|
return setTimeout(fn, delay);
|
||||||
},
|
},
|
||||||
clearTimeout: function(fn, delay) {
|
clearTimeout: function(fn, delay) {
|
||||||
clearTimeout(fn, delay);
|
clearTimeout(fn, delay);
|
||||||
@@ -2513,7 +2513,7 @@ describe('Env integration', function() {
|
|||||||
it('is "failed"', function(done) {
|
it('is "failed"', function(done) {
|
||||||
var global = {
|
var global = {
|
||||||
setTimeout: function(fn, delay) {
|
setTimeout: function(fn, delay) {
|
||||||
setTimeout(fn, delay);
|
return setTimeout(fn, delay);
|
||||||
},
|
},
|
||||||
clearTimeout: function(fn, delay) {
|
clearTimeout: function(fn, delay) {
|
||||||
clearTimeout(fn, delay);
|
clearTimeout(fn, delay);
|
||||||
@@ -2835,10 +2835,6 @@ describe('Env integration', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('provides custom equality testers to async matchers', function(done) {
|
it('provides custom equality testers to async matchers', function(done) {
|
||||||
if (jasmine.getEnv().skipBrowserFlake) {
|
|
||||||
jasmine.getEnv().skipBrowserFlake();
|
|
||||||
}
|
|
||||||
|
|
||||||
jasmine.getEnv().requirePromises();
|
jasmine.getEnv().requirePromises();
|
||||||
|
|
||||||
var specDone = jasmine.createSpy('specDone');
|
var specDone = jasmine.createSpy('specDone');
|
||||||
|
|||||||
Reference in New Issue
Block a user