mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
7561123a9f
PR-URL: https://github.com/nodejs/node/pull/8595 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
14 lines
407 B
JavaScript
14 lines
407 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const cluster = require('cluster');
|
|
const fork = cluster.fork;
|
|
|
|
if (cluster.isMaster) {
|
|
fork(); // it is intentionally called `fork` instead of
|
|
fork(); // `cluster.fork` to test that `this` is not used
|
|
cluster.disconnect(common.mustCall(() => {
|
|
assert.deepStrictEqual(Object.keys(cluster.workers), []);
|
|
}));
|
|
}
|