Skip to content

Commit

Permalink
Document the stub.reset breaking change (#1590)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeChampion authored and fatso83 committed Oct 25, 2017
1 parent aab1917 commit d4dcfca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guides/migrating-to-2.0.md
Expand Up @@ -38,6 +38,16 @@ sinon.stub(obj, 'meth', fn);
sinon.stub(obj, 'meth').callsFake(fn);
```
## stub.resetHistory replaces stub.reset
`stub.reset()` now resets the history and the behaviour of the stub. Previously `stub.reset()` only reset the history of the stub. Stubs now have separate methods for resetting the history and the behaviour. To mimic the old behaviour replace all `stub.reset()` calls with `stub.resetHistory()`.
```js
// Old
stub.reset();
// New
stub.resetHistory();
```
## Deprecation of internal helpers
The following utility functions are being marked as deprecated and are planned for removal in Sinon v3.0; please check your codebase for usage to ease future migrations:
Expand Down

0 comments on commit d4dcfca

Please sign in to comment.