Commit 3d11152
committed
test: make transformProjectRoot CWD-agnostic
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: #613031 parent 4bc42c0 commit 3d11152
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | | - | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
0 commit comments