Skip to content

Commit

Permalink
Merge pull request #886 from wheresrhys/rhys/jest-fetch-docs
Browse files Browse the repository at this point in the history
docs: document that fetch can be passed into expectations in jest wrapper
  • Loading branch information
wheresrhys authored Nov 29, 2024
2 parents 9071395 + 093c990 commit 608e425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/docs/wrappers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
sidebar_label: Wrappers
sidebar_position: 8
---

- [@fetch-mock/jest](/fetch-mock/docs/wrappers/jest)
- [@fetch-mock/vitest](/fetch-mock/docs/wrappers/vitest)
2 changes: 1 addition & 1 deletion docs/docs/wrappers/jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Note that these **will not** clear any sticky routes added to fetchMock. You wil

### Expect extensions

These are added to jest automatically and are available on any expect call that is passed fetchMock as an argument. Their behaviour is similar to the jest expectation methods mentioned in the comments below
These are added to jest automatically and are available on any expect call that is passed `fetchMock` (or `fetch`, if it has been mocked globally by fetchMock) as an argument. Their behaviour is similar to the jest expectation methods mentioned in the comments below

```js
expect(fetchMock).toHaveFetched(filter, options); // .toHaveBeenCalled()/.toHaveBeenCalledWith()
Expand Down

0 comments on commit 608e425

Please sign in to comment.