Skip to content

Commit 57568be

Browse files
dancer1325cpojer
andauthored
doc(docs.mockFunctions): use SAME JS module system (#15486)
Co-authored-by: Christoph Nakazawa <[email protected]>
1 parent 422c412 commit 57568be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/MockFunctions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function forEach(items, callback) {
2222
To test this function, we can use a mock function, and inspect the mock's state to ensure the callback is invoked as expected.
2323

2424
```js title="forEach.test.js"
25-
const forEach = require('./forEach');
25+
import { forEach } from './forEach';
2626

2727
const mockCallback = jest.fn(x => 42 + x);
2828

0 commit comments

Comments
 (0)