Skip to content

Commit

Permalink
link in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 22, 2021
1 parent 7ddc196 commit 6e35453
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -24,7 +24,7 @@
- `[jest-haste-map]` Add `enableSymlinks` configuration option to follow symlinks for test files ([#9351](https://github.com/facebook/jest/pull/9351))
- `[jest-reporters]` Add static filepath property to all reporters ([#11015](https://github.com/facebook/jest/pull/11015))
- `[jest-repl, jest-runner]` [**BREAKING**] Run transforms over environment ([#8751](https://github.com/facebook/jest/pull/8751))
- `[jest-resolver]` Support `node:` prefix when importing Node core modules
- `[jest-resolver]` Support `node:` prefix when importing Node core modules ([#11331](https://github.com/facebook/jest/pull/11331))
- `[jest-runner]` [**BREAKING**] set exit code to 1 if test logs after teardown ([#10728](https://github.com/facebook/jest/pull/10728))
- `[jest-runner]` [**BREAKING**] Run transforms over `runnner` ([#8823](https://github.com/facebook/jest/pull/8823))
- `[jest-runner]` [**BREAKING**] Run transforms over `testRunnner` ([#8823](https://github.com/facebook/jest/pull/8823))
Expand Down
8 changes: 4 additions & 4 deletions packages/jest-runtime/src/index.ts
Expand Up @@ -1327,19 +1327,19 @@ export default class Runtime {
}

private _requireCoreModule(moduleName: string) {
const moduleWithtoutNodePrefix = moduleName.startsWith('node:')
const moduleWithoutNodePrefix = moduleName.startsWith('node:')
? moduleName.slice('node:'.length)
: moduleName;

if (moduleWithtoutNodePrefix === 'process') {
if (moduleWithoutNodePrefix === 'process') {
return this._environment.global.process;
}

if (moduleWithtoutNodePrefix === 'module') {
if (moduleWithoutNodePrefix === 'module') {
return this._getMockedNativeModule();
}

return require(moduleWithtoutNodePrefix);
return require(moduleWithoutNodePrefix);
}

private _importCoreModule(moduleName: string, context: VMContext) {
Expand Down

0 comments on commit 6e35453

Please sign in to comment.