Skip to content

Commit

Permalink
Explain how to restore a wholly stubbed object
Browse files Browse the repository at this point in the history
I'm proposing this change based on [this issue](#1553).

Should this explanation be more specific? The only way I was able to access this method was by importing it directly with
```js
import restore from 'sinon/lib/sinon/util/core/restore.js'
```
Is there a more direct way to use it?
  • Loading branch information
samlandfried authored and mroderick committed Jun 17, 2019
1 parent 2902198 commit 534ddbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/_releases/latest/stubs.md
Expand Up @@ -86,7 +86,7 @@ A [codemod is available](https://github.com/hurrymaplelad/sinon-codemod) to upgr

#### `var stub = sinon.stub(obj);`

Stubs all the object's methods.
Stubs all the object's methods. Use the `restore` utility to restore an object stubbed this way.

Note that it's usually better practice to stub individual methods, particularly on objects that you don't understand or control all the methods for (e.g. library dependencies).

Expand Down

0 comments on commit 534ddbb

Please sign in to comment.