Skip to content

Commit

Permalink
Clarify the jest.requireActual example (#10255)
Browse files Browse the repository at this point in the history
  • Loading branch information
solimant authored Jul 9, 2020
1 parent 078da7f commit 9b75e6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- `[jest-jasmine2]` Refine typings of `queueRunner` ([#10215](https://github.com/facebook/jest/pull/10215))
- `[jest-jasmine2]` Remove usage of `Function` type ([#10216](https://github.com/facebook/jest/pull/10216))
- `[jest-resolve]` Improve types ([#10239](https://github.com/facebook/jest/pull/10239))
- `[docs]` Clarify the [`jest.requireActual(moduleName)`](https://jestjs.io/docs/en/jest-object#jestrequireactualmodulename) example

### Performance

Expand Down
2 changes: 1 addition & 1 deletion docs/JestObjectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Example:
```js
jest.mock('../myModule', () => {
// Require the original module to not be mocked...
const originalModule = jest.requireActual(moduleName);
const originalModule = jest.requireActual('../myModule');

return {
__esModule: true, // Use it when dealing with esModules
Expand Down

0 comments on commit 9b75e6f

Please sign in to comment.