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 committed 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
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,

Check failure on line 1656 in packages/jest-runtime/src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected object keys to be in ascending order. 'columnOffset' should be before 'filename'
// @ts-expect-error: Experimental ESM API
importModuleDynamically: async (specifier: string) => {
invariant(
Expand Down

0 comments on commit 2cfa76e

Please sign in to comment.