Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `usingPromise` method allows the setting of the promise library that will be used by the resolve and reject method. If it is not set then it will use the default promise implementation by default. Example: ```js var assert = require("assert"); var bluebird = require("bluebird"); var sinon = require("sinon"); var myObject = {}; var myStub = sinon.stub() .usingPromise(bluebird.Promise) .resolves(myObject); myStub() // Tap should now be available!!! .tap(function(actual) { assert.strictEqual(actual, myObject); }) .catch(function(err) { console.err("Error", err); }) ``` Documentation still to come.
- Loading branch information
Showing
3 changed files
with
59 additions
and
2 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