test: refactor test-async-wrap-* · nodejs/node@9e4ce6f · GitHub
Skip to content

Commit 9e4ce6f

Browse files
Trottaddaleax
authored andcommitted
test: refactor test-async-wrap-*
* `assert.equal()` -> `assert.strictEqual()` * add duration to `setTimeout()` PR-URL: #9663 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
1 parent 3130414 commit 9e4ce6f

4 files changed

Lines changed: 18 additions & 18 deletions

test/parallel/test-async-wrap-check-providers.js

Lines changed: 1 addition & 1 deletion

test/parallel/test-async-wrap-disabled-propagate-parent.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ function init(uid, type, parentUid, parentHandle) {
1818
cntr++;
1919
// Cannot assert in init callback or will abort.
2020
process.nextTick(() => {
21-
assert.equal(providers[type], 'TCPWRAP');
22-
assert.equal(parentUid, server._handle[uidSymbol],
23-
'server uid doesn\'t match parent uid');
24-
assert.equal(parentHandle, server._handle,
25-
'server handle doesn\'t match parent handle');
26-
assert.equal(this, client._handle, 'client doesn\'t match context');
21+
assert.strictEqual(providers[type], 'TCPWRAP');
22+
assert.strictEqual(parentUid, server._handle[uidSymbol],
23+
'server uid doesn\'t match parent uid');
24+
assert.strictEqual(parentHandle, server._handle,
25+
'server handle doesn\'t match parent handle');
26+
assert.strictEqual(this, client._handle, 'client doesn\'t match context');
2727
});
2828
}
2929
}
@@ -48,5 +48,5 @@ async_wrap.disable();
4848

4949
process.on('exit', function() {
5050
// init should have only been called once with a parent.
51-
assert.equal(cntr, 1);
51+
assert.strictEqual(cntr, 1);
5252
});

test/parallel/test-async-wrap-propagate-parent.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ function init(uid, type, parentUid, parentHandle) {
1818
cntr++;
1919
// Cannot assert in init callback or will abort.
2020
process.nextTick(() => {
21-
assert.equal(providers[type], 'TCPWRAP');
22-
assert.equal(parentUid, server._handle[uidSymbol],
23-
'server uid doesn\'t match parent uid');
24-
assert.equal(parentHandle, server._handle,
25-
'server handle doesn\'t match parent handle');
26-
assert.equal(this, client._handle, 'client doesn\'t match context');
21+
assert.strictEqual(providers[type], 'TCPWRAP');
22+
assert.strictEqual(parentUid, server._handle[uidSymbol],
23+
'server uid doesn\'t match parent uid');
24+
assert.strictEqual(parentHandle, server._handle,
25+
'server handle doesn\'t match parent handle');
26+
assert.strictEqual(this, client._handle, 'client doesn\'t match context');
2727
});
2828
}
2929
}
@@ -47,5 +47,5 @@ const server = net.createServer(function(c) {
4747

4848
process.on('exit', function() {
4949
// init should have only been called once with a parent.
50-
assert.equal(cntr, 1);
50+
assert.strictEqual(cntr, 1);
5151
});

test/parallel/test-async-wrap-throw-from-callback.js

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)