Skip to content

Commit 2cfa76e

Browse files
authored
Update jest-runtime
Include `columnOffset` property for `Script` allowing vscode to match the original file with the wrapped `Script` contents.
1 parent bc26cd7 commit 2cfa76e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/jest-runtime/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,7 @@ export default class Runtime {
16531653
return new Script(this.wrapCodeInModuleWrapper(scriptSource), {
16541654
displayErrors: true,
16551655
filename: scriptFilename,
1656+
columnOffset: this._fileTransforms.get(filename)?.wrapperLength,
16561657
// @ts-expect-error: Experimental ESM API
16571658
importModuleDynamically: async (specifier: string) => {
16581659
invariant(

0 commit comments

Comments
 (0)