Commit 6f063a9
committed
test(cli): fix Windows path separator issues in npm integration tests
Fixed 4 test failures on Windows by making path assertions platform-agnostic:
1. paths.test.mts: Updated regex patterns to accept both forward slashes (/)
and backslashes (\) as path separators when checking Module.createRequire paths
2. npm-base.test.mts: Changed URL cwd test to use regex matching instead of
exact equality, accounting for Windows drive letters (C:/custom/path vs /custom/path)
3. npm-base.test.mts: Fixed permission flags test to check for --allow-fs-write
flag presence without assuming specific cwd format
All 27 tests in these files now pass on both Unix and Windows platforms.
Related to commit 2a1b3d0 (esbuild Windows path fix) which fixed the root
cause of 490 test failures. These 4 tests required additional cross-platform
assertion fixes.1 parent b21162a commit 6f063a9
File tree
2 files changed
+7
-4
lines changed- packages/cli/src
- shadow
- utils/npm
2 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
228 | | - | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
0 commit comments