Commit 7643bc8
test: fix case-insensitive path matching on Windows
On Windows, file paths are case-insensitive but string comparison is
case-sensitive. When the drive letter case differs between the computed
project root and the actual output (e.g., 'C:/' vs 'c:/'), the path
replacement in transformProjectRoot() would fail.
This fix uses case-insensitive regex replacement on Windows to ensure
paths are correctly normalized in snapshot tests regardless of drive
letter casing.
Refs: nodejs/reliability#1453
PR-URL: #61682
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>1 parent a2843f8 commit 7643bc8Copy full SHA for 7643bc8
1 file changed
+9-3Lines changed: 9 additions & 3 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- test/common
Expand file treeCollapse file tree
Open diff view settings
Collapse file
test/common/assertSnapshot.js
Copy file name to clipboardExpand all lines: test/common/assertSnapshot.js+9-3Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
64 | 64 | |
65 | 65 | |
66 | 66 | |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
67 | 73 | |
68 | 74 | |
69 | 75 | |
70 | | - |
71 | | - |
72 | | - |
| 76 | + |
| 77 | + |
| 78 | + |
73 | 79 | |
74 | 80 | |
75 | 81 | |
|
0 commit comments