Skip to content
Permalink
Browse files

test: refactor exitedAfterDisconnect test

* minor refactoring to conform with test-writing layout guidelines
* rename test to use current terminology rather than deprecated
  terminology
* assert.strictEqual() -> assert.ok()

PR-URL: #16729
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
Trott committed Nov 5, 2017
1 parent 9f3d59e commit 3a4f0e9b76d292f002edd8bd6e23815dc87d07ba
@@ -1,8 +1,9 @@
'use strict';

const common = require('../common');

// Test should fail in Node.js 5.4.1 and pass in later versions.

const common = require('../common');
const assert = require('assert');
const cluster = require('cluster');

@@ -19,7 +20,7 @@ let eventFired = false;
cluster.worker.disconnect();

process.nextTick(common.mustCall(() => {
assert.strictEqual(eventFired, false, 'disconnect event should wait for ack');
assert.ok(!eventFired, 'disconnect event should wait for ack');
}));

cluster.worker.on('disconnect', common.mustCall(() => {

0 comments on commit 3a4f0e9

Please sign in to comment.
You can’t perform that action at this time.