We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I might be wrong, but shouldn't this test:
describe("results in multiple branching chains with their own fulfillment values", function () { testRejected(sentinel, function (promise, done) { var semiDone = callbackAggregator(3, done); promise.then(null, function () { return sentinel; }).then(function (value) { assert.strictEqual(value, sentinel); semiDone(); }); promise.then(null, function () { throw sentinel2; }).then(null, function (reason) { assert.strictEqual(reason, sentinel2); semiDone(); }); promise.then(null, function () { return sentinel3; }).then(function (value) { assert.strictEqual(value, sentinel3); semiDone(); }); }); });
be
describe("results in multiple branching chains with their own fulfillment values", function () { testRejected(sentinel, function (promise, done) { var semiDone = callbackAggregator(3, done); promise.then(null, function () { return sentinel; }).then(null, function (value) { assert.strictEqual(value, sentinel); semiDone(); }); promise.then(null, function () { throw sentinel2; }).then(null, function (reason) { assert.strictEqual(reason, sentinel2); semiDone(); }); promise.then(null, function () { return sentinel3; }).then(null, function (value) { assert.strictEqual(value, sentinel3); semiDone(); }); }); });
The text was updated successfully, but these errors were encountered:
Nope; since we return from the rejection handler, the promise will be fulfilled, not rejected.
Sorry, something went wrong.
Interesting. So rejecting with a new 'error' results in a fulfilled promise? So this models
try { } catch(e) { return newValue; }
That makes sense. But how would one model:
try { } catch(e) { throw new MyError(e); }
One would need to return a new rejected promise I guess? Or just throw the MyError(e) in the rejection handler?
Ah I see you test indeed checks the throw case. These tests are really great! Nice work
No branches or pull requests
I might be wrong, but shouldn't this test:
be
The text was updated successfully, but these errors were encountered: