summaryrefslogtreecommitdiff
path: root/test/parallel/test-cluster-worker-isconnected.js
diff options
context:
space:
mode:
authorRoman Reiss <me@silverwind.io>2015-05-19 13:00:06 +0200
committerRoman Reiss <me@silverwind.io>2015-05-19 21:21:27 +0200
commitf29762f4dd5811464684f820286f1c90a694bdff (patch)
tree67ba73a81c3938f41796dfa4c595f9713de59933 /test/parallel/test-cluster-worker-isconnected.js
parent85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff)
downloadandroid-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.tar.gz
android-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.tar.bz2
android-node-v8-f29762f4dd5811464684f820286f1c90a694bdff.zip
test: enable linting for tests
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-cluster-worker-isconnected.js')
-rw-r--r--test/parallel/test-cluster-worker-isconnected.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/test/parallel/test-cluster-worker-isconnected.js b/test/parallel/test-cluster-worker-isconnected.js
index ed839d4963..4477278e31 100644
--- a/test/parallel/test-cluster-worker-isconnected.js
+++ b/test/parallel/test-cluster-worker-isconnected.js
@@ -1,3 +1,4 @@
+'use strict';
var cluster = require('cluster');
var assert = require('assert');
var util = require('util');
@@ -6,32 +7,32 @@ if (cluster.isMaster) {
var worker = cluster.fork();
assert.ok(worker.isConnected(),
- "isConnected() should return true as soon as the worker has " +
- "been created.");
+ 'isConnected() should return true as soon as the worker has ' +
+ 'been created.');
worker.on('disconnect', function() {
assert.ok(!worker.isConnected(),
- "After a disconnect event has been emitted, " +
- "isConncted should return false");
+ 'After a disconnect event has been emitted, ' +
+ 'isConncted should return false');
});
worker.on('message', function(msg) {
if (msg === 'readyToDisconnect') {
worker.disconnect();
}
- })
+ });
} else {
assert.ok(cluster.worker.isConnected(),
- "isConnected() should return true from within a worker at all " +
- "times.");
+ 'isConnected() should return true from within a worker at all ' +
+ 'times.');
cluster.worker.process.on('disconnect', function() {
assert.ok(!cluster.worker.isConnected(),
- "isConnected() should return false from within a worker " +
- "after its underlying process has been disconnected from " +
- "the master");
- })
+ 'isConnected() should return false from within a worker ' +
+ 'after its underlying process has been disconnected from ' +
+ 'the master');
+ });
process.send('readyToDisconnect');
}