From 2cfa76e1c34322b4f1c35a56a208774390e5cc72 Mon Sep 17 00:00:00 2001 From: Bob den Os <108393871+BobdenOs@users.noreply.github.com> Date: Wed, 17 May 2023 10:55:08 +0200 Subject: [PATCH] Update jest-runtime Include `columnOffset` property for `Script` allowing vscode to match the original file with the wrapped `Script` contents. --- packages/jest-runtime/src/index.ts | 1 + 1 file changed, 1 insertion(+) 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(