Skip to content

Commit

Permalink
Update jest-runtime
Browse files Browse the repository at this point in the history
Include `columnOffset` property for `Script` allowing vscode to match the original file with the wrapped `Script` contents.
  • Loading branch information
BobdenOs authored May 17, 2023
1 parent bc26cd7 commit 2cfa76e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/jest-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2cfa76e

Please sign in to comment.