Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to break when.js rejection handler detection
var when1 = require('when1');
var when2 = require('when2');
var rejectedPromise = when1.reject(new Error('Intentional failure'));
when2(rejectedPromise).done(undefined, function(error){
console.log('Rejection properly handled:', error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.