Skip to content

test: make transformProjectRoot CWD-agnostic - #61506

Open
Jimmynycu wants to merge 1 commit into
nodejs:mainfrom
Jimmynycu:fix/cwd-agnostic-tests
Open

test: make transformProjectRoot CWD-agnostic#61506
Jimmynycu wants to merge 1 commit into
nodejs:mainfrom
Jimmynycu:fix/cwd-agnostic-tests

Conversation

@Jimmynycu

Copy link
Copy Markdown

Fix issue where tests fail when run from directories like /node because the project root path appears as a substring in URLs (nodejs.org) or other paths (/node_modules).

Use a regex that only matches the project root when followed by a path separator, colon, whitespace, or end of string.

Fixes: #61303

@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 Jan 24, 2026
Fix issue where tests fail when run from directories like /node
because the project root path appears as a substring in URLs
(nodejs.org) or other paths (/node_modules).

Use a regex that only matches the project root when followed by
a path separator, colon, whitespace, or end of string.

Fixes: nodejs#61303
@Jimmynycu
Jimmynycu force-pushed the fix/cwd-agnostic-tests branch from 3d11152 to 067cbdb Compare February 3, 2026 17:09
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

@github-actions github-actions Bot added the stale label Jul 28, 2026
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. stale test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some tests are not fully CWD-agnostic

2 participants