diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index f9945f8e7f72..d44a95ac9213 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -1653,6 +1653,7 @@ export default class Runtime { return new Script(this.wrapCodeInModuleWrapper(scriptSource), { displayErrors: true, filename: scriptFilename, + columnOffset: this._fileTransforms.get(filename)?.wrapperLength, // @ts-expect-error: Experimental ESM API importModuleDynamically: async (specifier: string) => { invariant(