Commit c68909d
committed
vfs: add comprehensive tests for bug fixes and lint cleanup
Add 18 feature-focused test files covering bug fixes from both analysis
rounds, and fix lint issues in stats.js and setup.js.
Test files added:
- test-vfs-access.js: access validation and mode enforcement
- test-vfs-buffer-encoding.js: buffer encodings and buffer path args
- test-vfs-copyfile-mode.js: copyFile COPYFILE_EXCL support
- test-vfs-dir-handle.js: Dir double-close and read/close callbacks
- test-vfs-file-url.js: file: URL handling with fileURLToPath
- test-vfs-mkdir-recursive-return.js: mkdirSync recursive return value
- test-vfs-no-auto-mkdir.js: writes/opens don't auto-create parents
- test-vfs-open-flags.js: read-only/write-only/exclusive/numeric flags
- test-vfs-readdir-recursive.js: readdir recursive with names and dirents
- test-vfs-readfile-fd.js: readFileSync with virtual fd
- test-vfs-rename-safety.js: renameSync preserves source on failure
- test-vfs-rm-edge-cases.js: rmSync dir/link edge cases
- test-vfs-stats-bigint.js: BigInt stats support
- test-vfs-stream-options.js: writestream start and stream fd option
- test-vfs-symlink-edge-cases.js: broken/intermediate symlinks
- test-vfs-watch-directory.js: directory and recursive watch
- test-vfs-watchfile.js: unwatchFile cleanup and zero stats
- test-vfs-writefile-flags.js: writeFile/appendFile flag support
Lint fixes:
- stats.js: use BigInt from primordials, add missing JSDoc @returns
- setup.js: consolidate ERR_MODULE_NOT_FOUND import1 parent 85e4ef5 commit c68909d
File tree
26 files changed
+1183
-64
lines changed- lib
- internal/vfs
- providers
- test/parallel
26 files changed
+1183
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3748 | 3748 | | |
3749 | 3749 | | |
3750 | 3750 | | |
3751 | | - | |
| 3751 | + | |
3752 | 3752 | | |
3753 | 3753 | | |
3754 | 3754 | | |
| |||
3778 | 3778 | | |
3779 | 3779 | | |
3780 | 3780 | | |
3781 | | - | |
| 3781 | + | |
3782 | 3782 | | |
3783 | 3783 | | |
3784 | 3784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
575 | | - | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
581 | 588 | | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
587 | 595 | | |
588 | 596 | | |
589 | 597 | | |
| |||
1281 | 1289 | | |
1282 | 1290 | | |
1283 | 1291 | | |
1284 | | - | |
1285 | 1292 | | |
1286 | 1293 | | |
1287 | 1294 | | |
1288 | 1295 | | |
1289 | 1296 | | |
1290 | | - | |
| 1297 | + | |
1291 | 1298 | | |
1292 | 1299 | | |
1293 | 1300 | | |
1294 | 1301 | | |
1295 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1296 | 1309 | | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1302 | 1316 | | |
1303 | 1317 | | |
1304 | 1318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
| 269 | + | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
| |||
396 | 406 | | |
397 | 407 | | |
398 | 408 | | |
399 | | - | |
| 409 | + | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
403 | 413 | | |
404 | 414 | | |
| 415 | + | |
405 | 416 | | |
406 | 417 | | |
407 | 418 | | |
| |||
510 | 521 | | |
511 | 522 | | |
512 | 523 | | |
513 | | - | |
| 524 | + | |
514 | 525 | | |
515 | 526 | | |
516 | 527 | | |
| |||
519 | 530 | | |
520 | 531 | | |
521 | 532 | | |
522 | | - | |
| 533 | + | |
523 | 534 | | |
524 | 535 | | |
525 | 536 | | |
| |||
632 | 643 | | |
633 | 644 | | |
634 | 645 | | |
| 646 | + | |
635 | 647 | | |
636 | 648 | | |
637 | 649 | | |
| |||
640 | 652 | | |
641 | 653 | | |
642 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
643 | 658 | | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
647 | 662 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
| 663 | + | |
654 | 664 | | |
655 | 665 | | |
656 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
657 | 672 | | |
658 | 673 | | |
659 | 674 | | |
| |||
805 | 820 | | |
806 | 821 | | |
807 | 822 | | |
808 | | - | |
| 823 | + | |
809 | 824 | | |
810 | 825 | | |
811 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
214 | 233 | | |
215 | 234 | | |
216 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
217 | 259 | | |
218 | 260 | | |
219 | 261 | | |
| |||
241 | 283 | | |
242 | 284 | | |
243 | 285 | | |
244 | | - | |
| 286 | + | |
245 | 287 | | |
246 | 288 | | |
247 | 289 | | |
248 | 290 | | |
249 | | - | |
| 291 | + | |
250 | 292 | | |
251 | 293 | | |
252 | 294 | | |
| |||
303 | 345 | | |
304 | 346 | | |
305 | 347 | | |
306 | | - | |
| 348 | + | |
307 | 349 | | |
308 | 350 | | |
309 | 351 | | |
310 | 352 | | |
311 | | - | |
| 353 | + | |
312 | 354 | | |
313 | 355 | | |
314 | 356 | | |
| |||
0 commit comments