Merge branch 'marneborn-bluebird3.0-warnings'

- Merges #1062 from @marneborn
- Fixes #992
This commit is contained in:
slackersoft
2016-03-11 09:11:54 -08:00
2 changed files with 15 additions and 0 deletions

View File

@@ -220,6 +220,20 @@ describe("QueueRunner", function() {
jasmine.clock().tick(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() {

View File

@@ -7,6 +7,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
called = true;
fn();
}
return null;
};
}