Commit 201a8d9
test: refactor
The current API is somewhat confusing at times and simpler usage is
possible. This overloads the arguments further to accept objects
with deprecation codes as property keys. It also adds documentation
for the different possible styles.
Besides that it is now going to validate for the code being present
in case of deprecations but not for other cases. The former validation
was not consistent as it only validated some cases and accepted
undefined instead of `common.noWarnCode`. This check is removed due to
the lack of consistency. `common.noWarnCode` is completely removed
due to just being sugar for `undefined`.
This also verifies that the warning order is identical to the order
in which they are triggered.
PR-URL: #25251
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>common.expectWarning()
1 parent f0202a7 commit 201a8d9Copy full SHA for 201a8d9
File tree
Expand file treeCollapse file tree
17 files changed
+119
-108
lines changedOpen diff view settings
Filter options
- test
- common
- parallel
Expand file treeCollapse file tree
17 files changed
+119
-108
lines changedOpen diff view settings
Collapse file
+43-9Lines changed: 43 additions & 9 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
109 | 109 | |
110 | 110 | |
111 | 111 | |
112 | | - |
113 | | - |
114 | | - |
| 112 | + |
| 113 | + |
| 114 | + |
115 | 115 | |
116 | 116 | |
117 | | - |
118 | | - |
119 | | - |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
120 | 157 | |
121 | 158 | |
122 | 159 | |
| ||
262 | 299 | |
263 | 300 | |
264 | 301 | |
265 | | - |
266 | | - |
267 | | - |
268 | 302 | |
269 | 303 | |
270 | 304 | |
|
Collapse file
+27-39Lines changed: 27 additions & 39 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
508 | 508 | |
509 | 509 | |
510 | 510 | |
511 | | - |
512 | | - |
| 511 | + |
| 512 | + |
| 513 | + |
| 514 | + |
| 515 | + |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
| 520 | + |
| 521 | + |
| 522 | + |
513 | 523 | |
| 524 | + |
514 | 525 | |
515 | | - |
516 | | - |
517 | | - |
| 526 | + |
518 | 527 | |
519 | | - |
520 | | - |
521 | | - |
522 | 528 | |
523 | 529 | |
524 | 530 | |
525 | | - |
526 | | - |
527 | | - |
528 | | - |
529 | | - |
530 | | - |
| 531 | + |
531 | 532 | |
532 | | - |
533 | | - |
534 | | - |
535 | | - |
536 | | - |
537 | | - |
538 | | - |
539 | | - |
540 | | - |
541 | | - |
542 | | - |
543 | | - |
544 | | - |
545 | | - |
546 | | - |
547 | | - |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
552 | | - |
553 | | - |
| 533 | + |
| 534 | + |
| 535 | + |
| 536 | + |
554 | 537 | |
| 538 | + |
| 539 | + |
| 540 | + |
| 541 | + |
555 | 542 | |
556 | | - |
| 543 | + |
557 | 544 | |
558 | | - |
| 545 | + |
| 546 | + |
| 547 | + |
559 | 548 | |
560 | 549 | |
561 | 550 | |
| ||
769 | 758 | |
770 | 759 | |
771 | 760 | |
772 | | - |
773 | 761 | |
774 | 762 | |
775 | 763 | |
|
Collapse file
-2Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | | - |
41 | 40 | |
42 | 41 | |
43 | 42 | |
| ||
84 | 83 | |
85 | 84 | |
86 | 85 | |
87 | | - |
88 | 86 | |
89 | 87 | |
90 | 88 | |
|
Collapse file
test/parallel/test-atomics-notify.js
Copy file name to clipboardExpand all lines: test/parallel/test-atomics-notify.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
| 3 | + |
4 | 4 | |
5 | 5 | |
6 | 6 | |
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
19 | 19 | |
Collapse file
test/parallel/test-console.js
Copy file name to clipboardExpand all lines: test/parallel/test-console.js+8-8Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
42 | 42 | |
43 | 43 | |
44 | 44 | |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
53 | 53 | |
54 | 54 | |
55 | 55 | |
|
Collapse file
test/parallel/test-crypto-authenticated.js
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-authenticated.js+19-19Lines changed: 19 additions & 19 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
72 | 72 | |
73 | 73 | |
74 | 74 | |
|
Collapse file
test/parallel/test-crypto-cipher-decipher.js
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-cipher-decipher.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
17 | 17 | |
18 | 18 | |
|
Collapse file
test/parallel/test-dns-lookup.js
Copy file name to clipboardExpand all lines: test/parallel/test-dns-lookup.js+6-8Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
| 24 | + |
24 | 25 | |
25 | 26 | |
26 | 27 | |
27 | 28 | |
28 | 29 | |
29 | 30 | |
30 | | - |
31 | | - |
32 | | - |
| 31 | + |
33 | 32 | |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
39 | 37 | |
40 | 38 | |
41 | 39 | |
|
Collapse file
test/parallel/test-fs-filehandle.js
Copy file name to clipboardExpand all lines: test/parallel/test-fs-filehandle.js+2-4Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
25 | | - |
| 24 | + |
26 | 25 | |
27 | 26 | |
28 | | - |
29 | | - |
| 27 | + |
30 | 28 | |
31 | 29 | |
32 | 30 | |
|
Collapse file
test/parallel/test-https-strict.js
Copy file name to clipboardExpand all lines: test/parallel/test-https-strict.js+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | | - |
36 | | - |
| 35 | + |
37 | 36 | |
38 | 37 | |
39 | 38 | |
|
0 commit comments