Skip to content

Commit b93833b

Browse files
committed
fix: await transform and require calls
1 parent b1a5b4d commit b93833b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/jest-runner/src/runTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async function runTestInternal(
107107

108108
const transformer = new ScriptTransformer(config);
109109
const TestEnvironment: typeof JestEnvironment = interopRequireDefault(
110-
transformer.requireAndTranspileModule(testEnvironment),
110+
await transformer.requireAndTranspileModule(testEnvironment),
111111
).default;
112112
const testFramework: TestFramework =
113113
process.env.JEST_CIRCUS === '1'

packages/jest-runtime/src/cli/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ export function run(cliArgv?: Config.Argv, cliInfo?: Array<string>) {
8181
maxWorkers: Math.max(os.cpus().length - 1, 1),
8282
watchman: globalConfig.watchman,
8383
}) as Promise<Context>)
84-
.then(hasteMap => {
84+
.then(async hasteMap => {
8585
const transformer = new Runtime.ScriptTransformer(config);
86-
const Environment: typeof JestEnvironment = transformer.requireAndTranspileModule(
86+
const Environment: typeof JestEnvironment = await transformer.requireAndTranspileModule(
8787
config.testEnvironment,
8888
);
8989
const environment = new Environment(config);

0 commit comments

Comments
 (0)