Skip to content

Commit

Permalink
fix(babel-plugin-jest-hoist): getting full list of whitelisted global…
Browse files Browse the repository at this point in the history
…s for node 12 (#8429)
  • Loading branch information
IanSavchenko authored and SimenB committed May 7, 2019
1 parent f2eaf4b commit aca4861
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,8 @@

### Fixes

- `[babel-plugin-jest-hoist]` Expand list of whitelisted globals in global mocks ([#8429](https://github.com/facebook/jest/pull/8429)

### Chore & Maintenance

### Performance
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-jest-hoist/src/index.ts
Expand Up @@ -74,7 +74,7 @@ const WHITELISTED_IDENTIFIERS: Set<string> = new Set([
'require',
'undefined',
]);
Object.keys(global).forEach(name => {
Object.getOwnPropertyNames(global).forEach(name => {
WHITELISTED_IDENTIFIERS.add(name);
});

Expand Down

0 comments on commit aca4861

Please sign in to comment.