Skip to content

Commit

Permalink
fix: await transform and require calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark1626 committed Aug 8, 2019
1 parent b1a5b4d commit b93833b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/jest-runner/src/runTest.ts
Expand Up @@ -107,7 +107,7 @@ async function runTestInternal(

const transformer = new ScriptTransformer(config);
const TestEnvironment: typeof JestEnvironment = interopRequireDefault(
transformer.requireAndTranspileModule(testEnvironment),
await transformer.requireAndTranspileModule(testEnvironment),
).default;
const testFramework: TestFramework =
process.env.JEST_CIRCUS === '1'
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-runtime/src/cli/index.ts
Expand Up @@ -81,9 +81,9 @@ export function run(cliArgv?: Config.Argv, cliInfo?: Array<string>) {
maxWorkers: Math.max(os.cpus().length - 1, 1),
watchman: globalConfig.watchman,
}) as Promise<Context>)
.then(hasteMap => {
.then(async hasteMap => {
const transformer = new Runtime.ScriptTransformer(config);
const Environment: typeof JestEnvironment = transformer.requireAndTranspileModule(
const Environment: typeof JestEnvironment = await transformer.requireAndTranspileModule(
config.testEnvironment,
);
const environment = new Environment(config);
Expand Down

0 comments on commit b93833b

Please sign in to comment.