Skip to content

Commit

Permalink
Merge pull request #191 from igormalyk/readme-update
Browse files Browse the repository at this point in the history
Update README with info about reset methods
  • Loading branch information
ctimmerm committed Mar 20, 2019
2 parents 8d4ba38 + d6b9509 commit 0e6f790
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Expand Up @@ -79,7 +79,13 @@ You can restore the original adapter (which will remove the mocking behavior)
mock.restore();
```

You can also reset the registered mock handlers with `reset`
You can also reset the registered mock handlers with `resetHandlers`

```js
mock.resetHandlers();
```

You can reset both registered mock handlers and history items with `reset`

```js
mock.reset();
Expand Down Expand Up @@ -303,3 +309,9 @@ describe('Feature', () => {
});
});
```

You can clear the history with `resetHistory`

```js
mock.resetHistory();
```

0 comments on commit 0e6f790

Please sign in to comment.