Commit 1fdbaed
test: begin normalizing fixtures use
Adds a new `../common/fixtures' module to begin normalizing
`test/fixtures` use. Our test code is a bit inconsistent with
regards to use of the fixtures directory. Some code uses
`path.join()`, some code uses string concats, some other
code uses template strings, etc. In mnay cases, significant
duplication of code is seen when accessing fixture files, etc.
This updates many (but by no means all) of the tests in the
test suite to use the new consistent API. There are still
many more to update, which would make an excelent Code-n-Learn
exercise.
Backport-PR-URL: #16265
PR-URL: #14332
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>1 parent 88b9572 commit 1fdbaedCopy full SHA for 1fdbaed
File tree
Expand file treeCollapse file tree
113 files changed
+466
-481
lines changedOpen diff view settings
Filter options
- test
- common
- parallel
- sequential
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
113 files changed
+466
-481
lines changedOpen diff view settings
Collapse file
+31Lines changed: 31 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
316 | 316 | |
317 | 317 | |
318 | 318 | |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
| 341 | + |
| 342 | + |
| 343 | + |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
319 | 350 | |
320 | 351 | |
321 | 352 | |
|
Collapse file
test/common/fixtures.js
Copy file name to clipboard+28Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
| 11 | + |
11 | 12 | |
12 | 13 | |
13 | 14 | |
14 | 15 | |
15 | 16 | |
16 | 17 | |
17 | | - |
| 18 | + |
| 19 | + |
18 | 20 | |
19 | 21 | |
20 | 22 | |
|
Collapse file
test/parallel/test-child-process-detached.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-detached.js+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | | - |
| 4 | + |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
| 7 | + |
9 | 8 | |
10 | 9 | |
11 | 10 | |
|
Collapse file
test/parallel/test-child-process-execfile.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-execfile.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | 5 | |
| 6 | + |
7 | 7 | |
8 | | - |
| 8 | + |
9 | 9 | |
10 | 10 | |
11 | 11 | |
|
Collapse file
test/parallel/test-child-process-exit-code.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-exit-code.js+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | | - |
| 7 | + |
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
16 | | - |
| 15 | + |
17 | 16 | |
18 | 17 | |
19 | 18 | |
|
Collapse file
test/parallel/test-child-process-fork-close.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork-close.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
5 | 6 | |
6 | | - |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
|
Collapse file
test/parallel/test-child-process-fork.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
7 | | - |
| 8 | + |
8 | 9 | |
9 | 10 | |
10 | 11 | |
|
Collapse file
test/parallel/test-child-process-fork3.js
Copy file name to clipboard+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
| 4 | + |
4 | 5 | |
5 | | - |
| 6 | + |
Collapse file
test/parallel/test-child-process-ipc.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-ipc.js+4-5Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
| 3 | + |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
| 7 | + |
7 | 8 | |
8 | | - |
9 | | - |
10 | | - |
| 9 | + |
11 | 10 | |
12 | 11 | |
13 | 12 | |
|
0 commit comments