test: unify assertSnapshot stacktrace transform#61665
Open
legendecas wants to merge 2 commits intonodejs:mainfrom
Open
test: unify assertSnapshot stacktrace transform#61665legendecas wants to merge 2 commits intonodejs:mainfrom
legendecas wants to merge 2 commits intonodejs:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61665 +/- ##
==========================================
+ Coverage 89.73% 89.75% +0.01%
==========================================
Files 674 674
Lines 204360 204394 +34
Branches 39274 39280 +6
==========================================
+ Hits 183390 183461 +71
+ Misses 13303 13236 -67
- Partials 7667 7697 +30 🚀 New features to boost your workflow:
|
The snapshotted stack frames should hide node internal stack frames so that general node core development does not need updating the snapshot. For userland stack frames, they are highly fixture related and any fixture change should reflect in a change of the snapshot. Additionally, the line and column number are highly relevant to the correctness of the snapshot, these should not be redacted. A change in node core that affects userland stack frames should be alarming and be reflected in the snapshots. Features like test runner and source map support both should snapshot userland stack frames to ensure that userland code locations are computed correctly.
d0d45b2 to
9f7ada0
Compare
legendecas
commented
Feb 4, 2026
| ); | ||
|
|
||
| // eslint-disable-next-line no-control-regex | ||
| child.stdout.on('data', (d) => process.stdout.write(d.toString().replace(/[^\x00-\x7F]/g, '').replace(/\u001b\[\d+m/g, ''))); |
Member
Author
There was a problem hiding this comment.
This was basically skipping the test of unusual chars in CWD on the CI.
5c4203b to
d72d40b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The snapshotted stack frames should hide node internal stack frames so
that general node core development does not need updating the snapshot.
Internal stack frames are replaced with
at <node-internal-frames>.For userland stack frames, they are highly fixture related and any
fixture change should reflect in a change of the snapshot. Additionally,
the line and column number are highly relevant to the correctness of the
snapshot, these should not be redacted. A change in node core that
affects userland stack frames should be alarming and be reflected in the
snapshots.
Features like test runner and source map support both should snapshot
userland stack frames to ensure that userland code locations are
computed correctly.