Commit 60de9f8
test: wrap assert.fail when passed to callback
Currently there are many instances where assert.fail is directly passed
to a callback for error handling. Unfortunately this will swallow the
error as it is the third argument of assert.fail that sets the message
not the first.
This commit adds a new function to test/common.js that simply wraps
assert.fail and calls it with the provided message.
Tip of the hat to @Trott for pointing me in the direction of this.
PR-URL: #3453
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent 7added3 commit 60de9f8Copy full SHA for 60de9f8
File tree
Expand file treeCollapse file tree
37 files changed
+81
-77
lines changedOpen diff view settings
Filter options
- test
- parallel
- pummel
- sequential
Expand file treeCollapse file tree
37 files changed
+81
-77
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
442 | 442 | |
443 | 443 | |
444 | 444 | |
| 445 | + |
| 446 | + |
| 447 | + |
| 448 | + |
Collapse file
test/parallel/test-child-process-recv-handle.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-recv-handle.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
| 27 | + |
28 | 28 | |
29 | 29 | |
30 | 30 | |
|
Collapse file
test/parallel/test-child-process-spawn-typeerror.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-spawn-typeerror.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
| 16 | + |
17 | 17 | |
18 | 18 | |
19 | 19 | |
|
Collapse file
test/parallel/test-cluster-bind-privileged-port.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-bind-privileged-port.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
24 | | - |
| 23 | + |
| 24 | + |
25 | 25 | |
26 | 26 | |
27 | 27 | |
|
Collapse file
test/parallel/test-cluster-bind-twice.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-bind-twice.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
68 | 68 | |
69 | 69 | |
70 | 70 | |
71 | | - |
| 71 | + |
72 | 72 | |
73 | 73 | |
74 | 74 | |
| ||
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | | - |
| 87 | + |
88 | 88 | |
89 | 89 | |
90 | 90 | |
91 | 91 | |
92 | | - |
| 92 | + |
93 | 93 | |
94 | 94 | |
95 | 95 | |
|
Collapse file
test/parallel/test-cluster-eaddrinuse.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-eaddrinuse.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
17 | 17 | |
18 | 18 | |
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
28 | | - |
| 27 | + |
| 28 | + |
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | | - |
| 34 | + |
35 | 35 | |
36 | 36 | |
37 | 37 | |
|
Collapse file
test/parallel/test-cluster-net-listen.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-net-listen.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
| 20 | + |
21 | 21 | |
Collapse file
test/parallel/test-cluster-rr-ref.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-rr-ref.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
| 13 | + |
14 | 14 | |
15 | 15 | |
16 | 16 | |
|
Collapse file
test/parallel/test-cluster-setup-master-argv.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-setup-master-argv.js+1-1Lines changed: 1 addition & 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 | |
|
Collapse file
test/parallel/test-cluster-shared-handle-bind-error.js
Copy file name to clipboardExpand all lines: test/parallel/test-cluster-shared-handle-bind-error.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | 14 | |
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
22 | | - |
| 21 | + |
| 22 | + |
23 | 23 | |
24 | 24 | |
25 | 25 | |
|
0 commit comments