Skip to content

Commit

Permalink
test: refactor exitedAfterDisconnect test
Browse files Browse the repository at this point in the history
* 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: nodejs#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 3a4f0e9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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');

Expand All @@ -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(() => {
Expand Down

0 comments on commit 3a4f0e9

Please sign in to comment.