Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 928291c

Browse filesBrowse files
sidthekidderMylesBorins
authored andcommitted
test: refactor test-domain.js
apply setTimeout duration, add const, remove unused var PR-URL: #10207 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
1 parent 13c6cec commit 928291c
Copy full SHA for 928291c

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-domain.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-domain.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Simple tests of most basic domain functionality.
33

44
require('../common');
5-
var assert = require('assert');
6-
var domain = require('domain');
7-
var events = require('events');
8-
var fs = require('fs');
5+
const assert = require('assert');
6+
const domain = require('domain');
7+
const events = require('events');
8+
const fs = require('fs');
99
var caught = 0;
1010
var expectCaught = 0;
1111

@@ -137,8 +137,8 @@ d.run(function() {
137137
// pretty common error.
138138
console.log(stat.isDirectory());
139139
});
140-
});
141-
});
140+
}, 1);
141+
}, 1);
142142
});
143143
});
144144
expectCaught++;
@@ -148,7 +148,7 @@ expectCaught++;
148148
d.run(function() {
149149
setTimeout(function() {
150150
throw new Error('implicit timer');
151-
});
151+
}, 1);
152152
});
153153
expectCaught++;
154154

@@ -162,7 +162,7 @@ expectCaught++;
162162
// get rid of the `if (er) return cb(er)` malarky, by intercepting
163163
// the cb functions to the domain, and using the intercepted function
164164
// as a callback instead.
165-
function fn(er) {
165+
function fn() {
166166
throw new Error('This function should never be called!');
167167
}
168168

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.