Skip to content

Commit

Permalink
Another unit test to cover the specific case in #23
Browse files Browse the repository at this point in the history
  • Loading branch information
briancavalier committed Mar 11, 2012
1 parent 6c4da96 commit f0faf9b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,28 @@ buster.testCase('promise', {

},

'should forward result when callback is null': function(done) {
var d = when.defer();

function fail(e) {
buster.fail(e);
done();
}

d.promise.then(
null,
fail
).then(
function(val) {
assert.equals(val, 1);
done();
},
fail
);

d.resolve(1);
},

'should forward callback result to next callback': function(done) {
var d = when.defer();

Expand Down

0 comments on commit f0faf9b

Please sign in to comment.