-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Milestone
Description
I ran into the following annoying warning, thrown by Bluebird, when a test is skipped at runtime within a Bluebird promise chain.
Warning: a promise was rejected with a non-error: [object Object]
Some context on the warning thrown by Bluebird: http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-rejected-with-a-non-error
Nevertheless, the root cause is that the Pending constructor in pending.js does not inherit from the Error constructor.
You can reproduce this by writing and running the following asynchronous test:
var Promise = require('bluebird');
Promise.config({
warnings: true,
longStackTraces: true
});
describe('Suite', function () {
it('Test', function () {
return Promise.bind(this).then(function () {
this.skip();
});
});
});Can this be fix?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Type
Projects
Status
In Progress