Skip to content

Commit

Permalink
tools: enable eslint one-var rule
Browse files Browse the repository at this point in the history
Backport-PR-URL: #19244
PR-URL: #18831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
BridgeAR authored and MylesBorins committed Mar 21, 2018
1 parent d4d7df8 commit b04dd7b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions benchmark/tls/tls-connect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
var fs = require('fs'),
path = require('path'),
tls = require('tls');
const fs = require('fs');
const path = require('path');
const tls = require('tls');

const common = require('../common.js');
const bench = common.createBenchmark(main, {
Expand Down
45 changes: 22 additions & 23 deletions test/parallel/test-cluster-worker-kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,28 @@ if (cluster.isWorker) {

} else if (cluster.isMaster) {

const KILL_SIGNAL = 'SIGKILL',
expected_results = {
cluster_emitDisconnect: [1, "the cluster did not emit 'disconnect'"],
cluster_emitExit: [1, "the cluster did not emit 'exit'"],
cluster_exitCode: [null, 'the cluster exited w/ incorrect exitCode'],
cluster_signalCode: [KILL_SIGNAL,
'the cluster exited w/ incorrect signalCode'],
worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"],
worker_emitExit: [1, "the worker did not emit 'exit'"],
worker_state: ['disconnected', 'the worker state is incorrect'],
worker_exitedAfter: [false,
'the .exitedAfterDisconnect flag is incorrect'],
worker_died: [true, 'the worker is still running'],
worker_exitCode: [null, 'the worker exited w/ incorrect exitCode'],
worker_signalCode: [KILL_SIGNAL,
'the worker exited w/ incorrect signalCode']
},
results = {
cluster_emitDisconnect: 0,
cluster_emitExit: 0,
worker_emitDisconnect: 0,
worker_emitExit: 0
};
const KILL_SIGNAL = 'SIGKILL';
const expected_results = {
cluster_emitDisconnect: [1, "the cluster did not emit 'disconnect'"],
cluster_emitExit: [1, "the cluster did not emit 'exit'"],
cluster_exitCode: [null, 'the cluster exited w/ incorrect exitCode'],
cluster_signalCode: [KILL_SIGNAL,
'the cluster exited w/ incorrect signalCode'],
worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"],
worker_emitExit: [1, "the worker did not emit 'exit'"],
worker_state: ['disconnected', 'the worker state is incorrect'],
worker_exitedAfter: [false, 'the .exitedAfterDisconnect flag is incorrect'],
worker_died: [true, 'the worker is still running'],
worker_exitCode: [null, 'the worker exited w/ incorrect exitCode'],
worker_signalCode: [KILL_SIGNAL,
'the worker exited w/ incorrect signalCode']
};
const results = {
cluster_emitDisconnect: 0,
cluster_emitExit: 0,
worker_emitDisconnect: 0,
worker_emitExit: 0
};


// start worker
Expand Down

0 comments on commit b04dd7b

Please sign in to comment.