test: refactor test-cluster-basic
* Use common.mustNotCall() to check that callback is not invoked. * Add space per test writing guide. PR-URL: https://github.com/nodejs/node/pull/13905 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
6dcead9793
commit
3b727aaa49
@ -21,6 +21,7 @@
|
||||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
const assert = require('assert');
|
||||
const cluster = require('cluster');
|
||||
|
||||
@ -35,7 +36,7 @@ function forEach(obj, fn) {
|
||||
|
||||
|
||||
if (cluster.isWorker) {
|
||||
require('http').Server(common.noop).listen(0, '127.0.0.1');
|
||||
require('http').Server(common.mustNotCall()).listen(0, '127.0.0.1');
|
||||
} else if (cluster.isMaster) {
|
||||
|
||||
const checks = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user