From 05510022e654c79e792522f208067b779a8efeea Mon Sep 17 00:00:00 2001 From: Oscar Martinez Date: Thu, 1 Dec 2016 10:54:07 -0600 Subject: [PATCH] test: refactor test-cluster-setup-master-argv - updated vars to const - add common.mustCall() to setup callback PR-URL: https://github.com/nodejs/node/pull/9960 Reviewed-By: Prince John Wesley Reviewed-By: Colin Ihrig --- test/parallel/test-cluster-setup-master-argv.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-cluster-setup-master-argv.js b/test/parallel/test-cluster-setup-master-argv.js index e570af7cd52a60..32c5a91b3caab4 100644 --- a/test/parallel/test-cluster-setup-master-argv.js +++ b/test/parallel/test-cluster-setup-master-argv.js @@ -1,16 +1,16 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var cluster = require('cluster'); +const common = require('../common'); +const assert = require('assert'); +const cluster = require('cluster'); setTimeout(common.fail.bind(assert, 'setup not emitted'), 1000).unref(); -cluster.on('setup', function() { +cluster.on('setup', common.mustCall(function() { var clusterArgs = cluster.settings.args; var realArgs = process.argv; assert.strictEqual(clusterArgs[clusterArgs.length - 1], realArgs[realArgs.length - 1]); -}); +})); assert.notStrictEqual(process.argv[process.argv.length - 1], 'OMG,OMG'); process.argv.push('OMG,OMG');