Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix presortedDecodedMap to only copy sourcemap fields #15

Merged
merged 2 commits into from Aug 11, 2022

Conversation

jridgewell
Copy link
Owner

Before, the presorted map would incorrectly copy over fields such as _decodedMemo, which fooled the duck-typing early return optimization. That would allow invalid _encoded state to be preserved, even if I explicitly set the map's mappings to a decoded segments array.

Fixes jestjs/jest#12998

Before, the presorted map would incorrectly copy over fields such as `_decodedMemo`, which fooled the duck-typing early return optimization. That would allow invalid `_encoded` state to be preserved, even if I explicitly set the map's `mappings` to a decoded segments array.
@jridgewell jridgewell merged commit 268d80c into main Aug 11, 2022
@jridgewell jridgewell deleted the presorted-clone branch August 11, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: --coverage regression in jest v28.1.2
1 participant