Skip to content

Update jest-runtime - #14148

Merged
SimenB merged 8 commits into
jestjs:mainfrom
BobdenOs:main
Jun 21, 2023
Merged

SimenB merged 8 commits into
jestjs:mainfrom
BobdenOs:main

Conversation

@BobdenOs

Copy link
Copy Markdown
Contributor

Include columnOffset property for Script allowing vscode to match the original file with the wrapped Script contents.

Summary

When debugging inside a jest test the vscode debugger is struggling to source map variables correctly. This applies for the hover variables and any debugger console vm scripts. This issue can be solved by setting transform as {}, but this comes with the side effect that now the original file can no longer be matched as the contents of the script includes the wrapper.

The length of the wrapper was already being tracked when applying the transformation. This information was only never passed along to the Script constructor.

Test plan

node docs

Include `columnOffset` property for `Script` allowing vscode to match the original file with the wrapped `Script` contents.
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 17, 2023 •

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@netlify

netlify Bot commented May 17, 2023 •

Copy link
Copy Markdown

✅ Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 114c6f7
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64922495b9ea37000886efb7
😎 Deploy Preview https://deploy-preview-14148--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@SimenB SimenB left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! 👍

Could you add a changelog entry and sign the CLA?

BobdenOs added 3 commits May 23, 2023 15:39
Add fix description
Fixes `Expected object keys to be in ascending order. 'columnOffset' should be before 'filename'`
@SimenB

SimenB commented May 24, 2023 •

Copy link
Copy Markdown
Member

Could you update the failing snapshots? Seems to only be e2e/__tests__/globals.test.ts

@SimenB
SimenB merged commit 8cb542c into jestjs:main Jun 21, 2023
@SimenB

SimenB commented Jul 4, 2023

Copy link
Copy Markdown
Member

@github-actions

github-actions Bot commented Aug 4, 2023

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants