Skip to content

Commit 53cb380

Browse files
author
Forbes Lindesay
committed
Add an extra test case
1 parent 079c8b9 commit 53cb380

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/extensions-tests.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ describe('extensions', function () {
231231
eventuallyRejected.onRejected(rejection);
232232
})
233233
})
234+
describe('when given a foreign promise', function () {
235+
it('should provide the correct value of `this`', function (done) {
236+
var p = {then: function (onFulfilled) { onFulfilled({self: this}); }};
237+
Promise.all([p]).then(function (results) {
238+
assert(p === results[0].self);
239+
}).nodeify(done);
240+
});
241+
});
234242
})
235243
})
236244

0 commit comments

Comments
 (0)