-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sinon.resetHistory() does not reset history #2022
Conversation
Pull Request Test Coverage Report for Build 2854
💛 - Coveralls |
@fatso83 , |
@rpgeeganage Basically you found a bug in If things work using Mocha, then that's your verification :-) |
@fatso83 , Finally, I verified the output using the main |
Of course I'd love some help on With regards to the test case, I think just adding a simplified version of the last test above to the file https://github.com/sinonjs/sinon/blob/master/test/issues/issues-test.js would be sufficient. Something like |
@fatso83 , |
@fatso83, |
@rpgeeganage We invite the ones who stick around, adding pull requests and seem interested in contributing to the project :-) |
@fatso83 , |
Thank you! |
I'm honored to work in this repo. |
PR sinonjs#2022 redirected sinon.createStubInstance() to use the Sandbox implementation thereof. This introduced a breaking change due to the sandbox implementation not supporting property overrides. Instead of duplicating the original behaviour from stub.js into sandbox.js, call through to the stub.js implementation then add all the stubs to the sandbox collection as usual. Copy the missing tests from stub-test.js
PR sinonjs#2022 redirected sinon.createStubInstance() to use the Sandbox implementation thereof. This introduced a breaking change due to the sandbox implementation not supporting property overrides. Instead of duplicating the original behaviour from stub.js into sandbox.js, call through to the stub.js implementation then add all the stubs to the sandbox collection as usual. Copy the missing tests from stub-test.js and add issue tests.
PR #2022 redirected sinon.createStubInstance() to use the Sandbox implementation thereof. This introduced a breaking change due to the sandbox implementation not supporting property overrides. Instead of duplicating the original behaviour from stub.js into sandbox.js, call through to the stub.js implementation then add all the stubs to the sandbox collection as usual. Copy the missing tests from stub-test.js and add issue tests.
* removed the createStubInstance method fonr sinon.js * added test
PR sinonjs#2022 redirected sinon.createStubInstance() to use the Sandbox implementation thereof. This introduced a breaking change due to the sandbox implementation not supporting property overrides. Instead of duplicating the original behaviour from stub.js into sandbox.js, call through to the stub.js implementation then add all the stubs to the sandbox collection as usual. Copy the missing tests from stub-test.js and add issue tests.
Purpose (TL;DR) - mandatory
Fix issue: #2016
sinon.resetHistory()
does not reset historyRemove
createStubInstance
fromsinon.js
so same method fromsandbox
will be used.How to verify - mandatory
No tests added yet.
But followed below code snippet.
Need to execute as follows.
mocha test.js
Got the following output.
Checklist for author
npm run lint
passes