summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Chen <amazingandyyy@gmail.com>2016-12-09 00:03:13 -0800
committerMichael Dawson <michael_dawson@ca.ibm.com>2016-12-14 13:37:22 -0500
commite27c2a76a8faac98ef7e990713334e5e11ab5bf2 (patch)
tree0fe7862ba8f8d892c1bbb893b7e379a77aa652b5
parentca58e5304701191a4f1a08519cb897e1e90f7790 (diff)
downloadnode-new-e27c2a76a8faac98ef7e990713334e5e11ab5bf2.tar.gz
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: https://github.com/nodejs/node/pull/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>
-rw-r--r--test/parallel/test-domain-uncaught-exception.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/parallel/test-domain-uncaught-exception.js b/test/parallel/test-domain-uncaught-exception.js
index 35632dbf53..58df4ac59a 100644
--- a/test/parallel/test-domain-uncaught-exception.js
+++ b/test/parallel/test-domain-uncaught-exception.js
@@ -25,7 +25,7 @@ function test1() {
d.run(function() {
setTimeout(function onTimeout() {
throw new Error('boom!');
- });
+ }, 1);
});
}
@@ -59,7 +59,7 @@ function test3() {
const d3 = domain.create();
const d4 = domain.create();
- d3.on('error', function onErrorInD3Domain(err) {
+ d3.on('error', function onErrorInD3Domain() {
process.send('errorHandledByDomain');
});
@@ -88,7 +88,7 @@ function test4() {
const d5 = domain.create();
const d6 = domain.create();
- d5.on('error', function onErrorInD2Domain(err) {
+ d5.on('error', function onErrorInD2Domain() {
process.send('errorHandledByDomain');
});
@@ -96,7 +96,7 @@ function test4() {
d6.run(function() {
setTimeout(function onTimeout() {
throw new Error('boom!');
- });
+ }, 1);
});
});
}
@@ -115,7 +115,7 @@ function test5() {
const d7 = domain.create();
const d8 = domain.create();
- d8.on('error', function onErrorInD3Domain(err) {
+ d8.on('error', function onErrorInD3Domain() {
process.send('errorHandledByDomain');
});
@@ -139,7 +139,7 @@ function test6() {
const d9 = domain.create();
const d10 = domain.create();
- d10.on('error', function onErrorInD2Domain(err) {
+ d10.on('error', function onErrorInD2Domain() {
process.send('errorHandledByDomain');
});
@@ -147,7 +147,7 @@ function test6() {
d10.run(function() {
setTimeout(function onTimeout() {
throw new Error('boom!');
- });
+ }, 1);
});
});
}