From 54ce1053aa462cd745127ac41d571d812c268580 Mon Sep 17 00:00:00 2001 From: "C. T. Lin" Date: Sat, 29 Oct 2022 15:52:19 +0800 Subject: [PATCH] chore(jest-runtime): `runtime.unstable_importModule` should not return `Promise` (#12009) --- packages/jest-runtime/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 7be6cf2db53d..22f2abe29a61 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -689,7 +689,7 @@ export default class Runtime { async unstable_importModule( from: string, moduleName?: string, - ): Promise { + ): Promise { invariant( runtimeSupportsVmModules, 'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules',