test: refactor domain tests · nodejs/node@3bdf7bf · GitHub
Skip to content

Commit 3bdf7bf

Browse files
TrottMylesBorins
authored andcommitted
test: refactor domain tests
* Check that noop callback is or isn't invoked as appropriate using common.mustCall() and common.mustNotCall() * Fix typo in array literal PR-URL: #13480 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 543d2de commit 3bdf7bf

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

test/parallel/test-domain-crypto.js

Lines changed: 3 additions & 3 deletions

test/parallel/test-domain-timers.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ const common = require('../common');
33
const domain = require('domain');
44
const assert = require('assert');
55

6-
let timeout;
7-
86
const timeoutd = domain.create();
97

108
timeoutd.on('error', common.mustCall(function(e) {
@@ -32,4 +30,4 @@ immediated.run(function() {
3230
});
3331
});
3432

35-
timeout = setTimeout(common.noop, 10 * 1000);
33+
const timeout = setTimeout(common.mustNotCall(), 10 * 1000);

test/parallel/test-domain.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)