sinon.resetHistory() does not reset history#2022
sinon.resetHistory() does not reset history#2022fatso83 merged 4 commits intosinonjs:masterfrom rpgeeganage:fix/sinon_reset_history
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
createStubInstancefromsinon.jsso same method fromsandboxwill be used.How to verify - mandatory
No tests added yet.
But followed below code snippet.
Need to execute as follows.
mocha test.jsGot the following output.
Checklist for author
npm run lintpasses