diff --git a/test/parallel/test-cluster-worker-destroy.js b/test/parallel/test-cluster-worker-destroy.js index c802177530e4af..ca3ac77e7b25cc 100644 --- a/test/parallel/test-cluster-worker-destroy.js +++ b/test/parallel/test-cluster-worker-destroy.js @@ -8,6 +8,7 @@ */ const common = require('../common'); +const assert = require('assert'); var cluster = require('cluster'); var worker1, worker2; @@ -26,7 +27,8 @@ if (cluster.isMaster) { cluster.worker.destroy(); }); - cluster.worker.disconnect(); + const w = cluster.worker.disconnect(); + assert.strictEqual(w, cluster.worker, 'did not return a reference'); } else { // Call destroy when worker is not disconnected yet cluster.worker.destroy();