-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
test: make snapshot path stripping CWD-agnostic #61351
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
Open
Open
+98
−15
Conversation
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
@nodejs-github-bot
nodejs-github-bot
added
esm
Issues and PRs related to the ECMAScript Modules implementation.
needs-ci
PRs that need a full CI run.
test
Issues and PRs related to the tests.
labels
Jan 12, 2026
7 tasks
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.51%. Comparing base (1bd7f62) to head (1afa7df).
Additional details and impacted files
@@ Coverage Diff @@ ## main #61351 +/- ## ========================================== - Coverage 88.51% 88.51% -0.01% ========================================== Files 704 704 Lines 208739 208739 Branches 40274 40279 +5 ========================================== - Hits 184770 184767 -3 - Misses 15968 15970 +2 - Partials 8001 8002 +1
🚀 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.
transformProjectRoot() now strips the project root only when it is a real path prefix, avoiding accidental matches inside tokens like 'node_modules' or URLs when the repository lives in paths such as '/node'. Also update the node output snapshot tests to use transformProjectRoot(), make permission deny tests handle running from the filesystem root, and relax import.meta path regexes for the same scenario. Add a regression test for transformProjectRoot(). Refs: nodejs#61303
@emicovi
emicovi
force-pushed
the
fix/test-cwd-agnostic-snapshots
branch
from
January 15, 2026 08:52
1afa7df to
fc94c8c
Compare
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.
transformProjectRoot() now strips the project root only when it is a real path prefix, avoiding accidental matches inside tokens like 'node_modules' or URLs when the repository lives in paths such as '/node'.
Also update the node output snapshot tests to use transformProjectRoot(), make permission deny tests handle running from the filesystem root, and relax import.meta path regexes for the same scenario.
Add a regression test for transformProjectRoot().
Refs: #61303