1.1.0 • Published 7 years ago

should-reject v1.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 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

7 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago