Skip to content

Commit

Permalink
fix(babel-plugin-jest-hoist): allow using module wrapper arguments in…
Browse files Browse the repository at this point in the history
… hoisted mock factory function (#10903)
  • Loading branch information
theneva committed Dec 3, 2020
1 parent 9e93de8 commit 149502d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@

### Fixes

- `[babel-plugin-jest-hoist]` Add `__dirname` and `__filename` to whitelisted globals ([#10903](https://github.com/facebook/jest/pull/10903))
- `[expect]` [**BREAKING**] Revise `expect.not.objectContaining()` to be the inverse of `expect.objectContaining()`, as documented. ([#10708](https://github.com/facebook/jest/pull/10708))
- `[jest-circus]` Fixed the issue of beforeAll & afterAll hooks getting executed even if it is inside a skipped `describe` block [#10451](https://github.com/facebook/jest/issues/10451)
- `[jest-circus]` Fix `testLocation` on Windows when using `test.each` ([#10871](https://github.com/facebook/jest/pull/10871))
Expand Down
4 changes: 4 additions & 0 deletions packages/babel-plugin-jest-hoist/src/index.ts
Expand Up @@ -85,7 +85,11 @@ const ALLOWED_IDENTIFIERS = new Set<string>(
'jest',
'parseFloat',
'parseInt',
'exports',
'require',
'module',
'__filename',
'__dirname',
'undefined',
...Object.getOwnPropertyNames(global),
].sort(),
Expand Down

0 comments on commit 149502d

Please sign in to comment.