1.1.0 • Published 8 years ago

should-reject v1.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

should-reject

Return a promise which is resolved when the original promise is rejected, and rejected when the original promise is resolved

Example

var shouldReject = require('should-reject');
var login = require('./login'); //A function that returns a promise
shouldReject(login('username','wrongPassword')).then(function() {
  console.log('Login function is ok');
},function() {
  console.log('Something is wrong with the login function');
});
1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago