Merge branch '3.99' into 4.0

This commit is contained in:
Steve Gravrock
2021-09-24 14:31:02 -07:00
3 changed files with 10 additions and 5 deletions

View File

@@ -7658,7 +7658,6 @@ getJasmineRequireObj().QueueRunner = function(j$) {
// TODO probably shouldn't next() right away here.
// That makes debugging async failures much more confusing.
onException(error);
next(error);
},
cleanup = once(function cleanup() {
if (timeoutId !== void 0) {

View File

@@ -701,9 +701,13 @@ describe('QueueRunner', function() {
jasmine.clock().uninstall();
});
it('skips to cleanup functions on the first exception', function() {
it('skips to cleanup functions once the fn completes after an unhandled exception', function() {
var errorListeners = [],
queueableFn = { fn: function(done) {} },
queueableFn = {
fn: function(done) {
queueableFnDone = done;
}
},
nextQueueableFn = { fn: jasmine.createSpy('nextFunction') },
cleanupFn = { fn: jasmine.createSpy('cleanup') },
queueRunner = new jasmineUnderTest.QueueRunner({
@@ -718,10 +722,13 @@ describe('QueueRunner', function() {
queueableFns: [queueableFn, nextQueueableFn],
cleanupFns: [cleanupFn],
completeOnFirstError: true
});
}),
queueableFnDone;
queueRunner.execute();
errorListeners[errorListeners.length - 1](new Error('error'));
expect(cleanupFn.fn).not.toHaveBeenCalled();
queueableFnDone();
expect(nextQueueableFn.fn).not.toHaveBeenCalled();
expect(cleanupFn.fn).toHaveBeenCalled();
});

View File

@@ -106,7 +106,6 @@ getJasmineRequireObj().QueueRunner = function(j$) {
// TODO probably shouldn't next() right away here.
// That makes debugging async failures much more confusing.
onException(error);
next(error);
},
cleanup = once(function cleanup() {
if (timeoutId !== void 0) {