domenic / promise-tests

DEPRECATED: use https://github.com/promises-aplus/promises-tests instead!
https://github.com/promises-aplus/promises-tests
Do What The F*ck You Want To Public License
61 stars 10 forks source link

"calls the fulfillment callback" test #8

Closed jkroso closed 12 years ago

jkroso commented 12 years ago

Since implementations like rsvp.js resolve asynchronously they are able to pass the test as it currently stands.When the test looks like this rsvp.js fails.

var p = fulfilled(sentinel)
setTimeout(function(){
  p.then(function (value) {
    assert.strictEqual(value, sentinel);
    done();
  });
}, 100)
domenic commented 12 years ago

Nice find, thank you very much.