Skip to content

Conversation

@legendecas
Copy link
Member

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.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.75%. Comparing base (c419f54) to head (d72d40b).
⚠️ Report is 17 commits behind head on main.

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     

see 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
@legendecas legendecas force-pushed the test-assert-snapshot-stack branch from d0d45b2 to 9f7ada0 Compare February 4, 2026 14:05
);

// 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, '')));
Copy link
Member Author

Choose a reason for hiding this comment

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

This was basically skipping the test of unusual chars in CWD on the CI.

@legendecas legendecas force-pushed the test-assert-snapshot-stack branch from 5c4203b to d72d40b Compare February 4, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants