Skip to content

Commit 308cead

Browse files
amazingandyyyMylesBorins
authored andcommitted
test: update test-domain-uncaught-exception.js
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 60542cb commit 308cead

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/parallel/test-domain-uncaught-exception.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function test1() {
2525
d.run(function() {
2626
setTimeout(function onTimeout() {
2727
throw new Error('boom!');
28-
});
28+
}, 1);
2929
});
3030
}
3131

@@ -59,7 +59,7 @@ function test3() {
5959
const d3 = domain.create();
6060
const d4 = domain.create();
6161

62-
d3.on('error', function onErrorInD3Domain(err) {
62+
d3.on('error', function onErrorInD3Domain() {
6363
process.send('errorHandledByDomain');
6464
});
6565

@@ -88,15 +88,15 @@ function test4() {
8888
const d5 = domain.create();
8989
const d6 = domain.create();
9090

91-
d5.on('error', function onErrorInD2Domain(err) {
91+
d5.on('error', function onErrorInD2Domain() {
9292
process.send('errorHandledByDomain');
9393
});
9494

9595
d5.run(function() {
9696
d6.run(function() {
9797
setTimeout(function onTimeout() {
9898
throw new Error('boom!');
99-
});
99+
}, 1);
100100
});
101101
});
102102
}
@@ -115,7 +115,7 @@ function test5() {
115115
const d7 = domain.create();
116116
const d8 = domain.create();
117117

118-
d8.on('error', function onErrorInD3Domain(err) {
118+
d8.on('error', function onErrorInD3Domain() {
119119
process.send('errorHandledByDomain');
120120
});
121121

@@ -139,15 +139,15 @@ function test6() {
139139
const d9 = domain.create();
140140
const d10 = domain.create();
141141

142-
d10.on('error', function onErrorInD2Domain(err) {
142+
d10.on('error', function onErrorInD2Domain() {
143143
process.send('errorHandledByDomain');
144144
});
145145

146146
d9.run(function() {
147147
d10.run(function() {
148148
setTimeout(function onTimeout() {
149149
throw new Error('boom!');
150-
});
150+
}, 1);
151151
});
152152
});
153153
}

0 commit comments

Comments
 (0)