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: #16729
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
Trott authored and cjihrig committed Nov 6, 2017
1 parent 72d0e7e commit 0ab3d37
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 0ab3d37

Please sign in to comment.