Issue 1598 (Feature Request): sandbox.createStubInstance - #1602
Merged
mroderick merged 1 commit intoNov 2, 2017
Merged
Conversation
… tests, and documentation.
dpmott
commented
Oct 30, 2017
| "test": "run-s test-node test-headless test-webworker", | ||
| "check-dependencies": "dependency-check package.json --unused --no-dev", | ||
| "build": "./build.js", | ||
| "build": "node ./build.js", |
Contributor
Author
There was a problem hiding this comment.
This change was necessary to run npm build or npm test locally on a Windows box. If it's inappropriate, then I'll happily revert this change.
Contributor
There was a problem hiding this comment.
That's fine. At some point we agreed that it was not a pre-requisite that the entire build process runs on Windows, as none of the maintainers were using it, but we are certainly not opposed to improving the situation :-)
| assert.isFunction(collection.mock); | ||
| }); | ||
|
|
||
| describe(".createStubInstance", function () { |
Contributor
Author
There was a problem hiding this comment.
These tests have largely been copied from stub-test.js.
Contributor
Author
|
Do I need to add any additional tests in sadnbox-test.js? |
Member
|
Thank you 🚀 This has become |
3 tasks
8 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose (TL;DR) - mandatory
Fix issue #1598 by implementing sandbox.createStubInstance(), tests, and documentation.
Background (Problem in detail) - optional
The addition of sandbox.createStubInstance() increases orthogonality with the Sinon stub interface.
Solution - optional
Implemented sandbox.createStubInstance() as a convenience wrapper around sandbox.stub(), for the case of stubbing an entire object.
How to verify - mandatory
npm installnpm testChecklist for author
npm run lintpasses