Browse Source

test: update var to const, use arrow functions

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>
v7.x
Matt Lang 8 years ago
committed by James M Snell
parent
commit
0835ca91c3
  1. 10
      test/parallel/test-cluster-disconnect-idle-worker.js

10
test/parallel/test-cluster-disconnect-idle-worker.js

@ -1,13 +1,13 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var cluster = require('cluster');
var fork = cluster.fork;
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(function() {
cluster.disconnect(common.mustCall(() => {
assert.deepStrictEqual(Object.keys(cluster.workers), []);
}));
}

Loading…
Cancel
Save