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 <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 60542cb commit 308cead

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function test1() {
2525
d.run(function(){
2626
setTimeout(functiononTimeout(){
2727
thrownewError('boom!');
28-
});
28+
},1);
2929
});
3030
}
3131

@@ -59,7 +59,7 @@ function test3() {
5959
constd3=domain.create();
6060
constd4=domain.create();
6161

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

@@ -88,15 +88,15 @@ function test4() {
8888
constd5=domain.create();
8989
constd6=domain.create();
9090

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

9595
d5.run(function(){
9696
d6.run(function(){
9797
setTimeout(functiononTimeout(){
9898
thrownewError('boom!');
99-
});
99+
},1);
100100
});
101101
});
102102
}
@@ -115,7 +115,7 @@ function test5() {
115115
constd7=domain.create();
116116
constd8=domain.create();
117117

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

@@ -139,15 +139,15 @@ function test6() {
139139
constd9=domain.create();
140140
constd10=domain.create();
141141

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

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

0 commit comments

Comments
 (0)