Merge branch 'marneborn-bluebird3.0-warnings'
- Merges #1062 from @marneborn - Fixes #992
This commit is contained in:
@@ -220,6 +220,20 @@ describe("QueueRunner", function() {
|
|||||||
jasmine.clock().tick(1);
|
jasmine.clock().tick(1);
|
||||||
expect(nextQueueableFn.fn.calls.count()).toEqual(1);
|
expect(nextQueueableFn.fn.calls.count()).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should return a null when you call done", function () {
|
||||||
|
// Some promises want handlers to return anything but undefined to help catch "forgotten returns".
|
||||||
|
var doneReturn,
|
||||||
|
queueableFn = { fn: function(done) {
|
||||||
|
doneReturn = done();
|
||||||
|
} },
|
||||||
|
queueRunner = new jasmineUnderTest.QueueRunner({
|
||||||
|
queueableFns: [queueableFn]
|
||||||
|
});
|
||||||
|
|
||||||
|
queueRunner.execute();
|
||||||
|
expect(doneReturn).toBe(null);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls exception handlers when an exception is thrown in a fn", function() {
|
it("calls exception handlers when an exception is thrown in a fn", function() {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
|
|||||||
called = true;
|
called = true;
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user