-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use overridable Unhanded Rejection Handler
- Loading branch information
1 parent
bf8d503
commit f6ede30
Showing
4 changed files
with
39 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
var tests = require('promises-aplus-tests'); | ||
var adapter = require('./adapter'); | ||
var Adaptor = require('./adapter'); | ||
|
||
tests.mocha(adapter); | ||
tests.mocha({ | ||
resolved: function(value) { | ||
return Adaptor.resolve(value); | ||
}, | ||
rejected: function(reason) { | ||
return Adaptor.reject(reason); | ||
}, | ||
deferred: function() { | ||
var deferred = {}; | ||
deferred.promise = new Adaptor(function(resolve, reject) { | ||
deferred.resolve = resolve; | ||
deferred.reject = reject; | ||
}); | ||
return deferred; | ||
} | ||
}); |