summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-07-25 10:37:08 -0700
committerRich Trott <rtrott@gmail.com>2017-07-27 09:24:20 -0700
commitaa6fac68da9b1d42123f0d56f60f39dc43d85d84 (patch)
treeeb94a442a9f929514b12b9ef4cd2a798c90c348e /test/sequential
parent4f0b10733483fbb62776b7973200e5fbb56349a9 (diff)
downloadandroid-node-v8-aa6fac68da9b1d42123f0d56f60f39dc43d85d84.tar.gz
android-node-v8-aa6fac68da9b1d42123f0d56f60f39dc43d85d84.tar.bz2
android-node-v8-aa6fac68da9b1d42123f0d56f60f39dc43d85d84.zip
test: adjust indentation for stricter linting
ESLint 4.x has stricter linting than previous versions. We are currently using the legacy indentation rules in the test directory. This commit changes the indentation of files to comply with the stricter 4.x linting and enable stricter linting in the test directory. PR-URL: https://github.com/nodejs/node/pull/14431 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-dgram-bind-shared-ports.js20
-rw-r--r--test/sequential/test-domain-abort-on-uncaught.js2
-rw-r--r--test/sequential/test-fs-watch.js72
-rw-r--r--test/sequential/test-regress-GH-877.js6
-rw-r--r--test/sequential/test-util-debug.js2
5 files changed, 51 insertions, 51 deletions
diff --git a/test/sequential/test-dgram-bind-shared-ports.js b/test/sequential/test-dgram-bind-shared-ports.js
index 699a82e5eb..9f7e23ba0b 100644
--- a/test/sequential/test-dgram-bind-shared-ports.js
+++ b/test/sequential/test-dgram-bind-shared-ports.js
@@ -83,19 +83,19 @@ if (cluster.isMaster) {
// First worker should bind, second should err
const socket3OnBind =
isSecondWorker ?
- common.mustNotCall() :
- common.mustCall(() => {
- const port3 = socket3.address().port;
- assert.strictEqual(typeof port3, 'number');
- process.send('success');
- });
+ common.mustNotCall() :
+ common.mustCall(() => {
+ const port3 = socket3.address().port;
+ assert.strictEqual(typeof port3, 'number');
+ process.send('success');
+ });
// an error is expected only in the second worker
const socket3OnError =
!isSecondWorker ?
- common.mustNotCall() :
- common.mustCall((err) => {
- process.send(`socket3:${err.code}`);
- });
+ common.mustNotCall() :
+ common.mustCall((err) => {
+ process.send(`socket3:${err.code}`);
+ });
const address = common.localhostIPv4;
const opt1 = { address, port: 0, exclusive: false };
const opt2 = { address, port: common.PORT, exclusive: false };
diff --git a/test/sequential/test-domain-abort-on-uncaught.js b/test/sequential/test-domain-abort-on-uncaught.js
index dfac371afc..a09db889bf 100644
--- a/test/sequential/test-domain-abort-on-uncaught.js
+++ b/test/sequential/test-domain-abort-on-uncaught.js
@@ -248,7 +248,7 @@ if (process.argv[2] === 'child') {
assert.strictEqual(
code, 0, `Test at index ${testIndex
} should have exited with exit code 0 but instead exited with code ${
- code} and signal ${signal}`);
+ code} and signal ${signal}`);
});
});
}
diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js
index a2b09b5419..9489a28dfa 100644
--- a/test/sequential/test-fs-watch.js
+++ b/test/sequential/test-fs-watch.js
@@ -54,18 +54,18 @@ common.refreshTmpDir();
fs.writeFileSync(filepathOne, 'hello');
assert.doesNotThrow(
- function() {
- const watcher = fs.watch(filepathOne);
- watcher.on('change', function(event, filename) {
- assert.strictEqual(event, 'change');
-
- if (expectFilePath) {
- assert.strictEqual(filename, 'watch.txt');
- }
- watcher.close();
- ++watchSeenOne;
- });
- }
+ function() {
+ const watcher = fs.watch(filepathOne);
+ watcher.on('change', function(event, filename) {
+ assert.strictEqual(event, 'change');
+
+ if (expectFilePath) {
+ assert.strictEqual(filename, 'watch.txt');
+ }
+ watcher.close();
+ ++watchSeenOne;
+ });
+ }
);
setImmediate(function() {
@@ -78,17 +78,17 @@ process.chdir(testDir);
fs.writeFileSync(filepathTwoAbs, 'howdy');
assert.doesNotThrow(
- function() {
- const watcher = fs.watch(filepathTwo, function(event, filename) {
- assert.strictEqual(event, 'change');
-
- if (expectFilePath) {
- assert.strictEqual(filename, 'hasOwnProperty');
- }
- watcher.close();
- ++watchSeenTwo;
- });
- }
+ function() {
+ const watcher = fs.watch(filepathTwo, function(event, filename) {
+ assert.strictEqual(event, 'change');
+
+ if (expectFilePath) {
+ assert.strictEqual(filename, 'hasOwnProperty');
+ }
+ watcher.close();
+ ++watchSeenTwo;
+ });
+ }
);
setImmediate(function() {
@@ -100,19 +100,19 @@ const testsubdir = fs.mkdtempSync(testDir + path.sep);
const filepathThree = path.join(testsubdir, filenameThree);
assert.doesNotThrow(
- function() {
- const watcher = fs.watch(testsubdir, function(event, filename) {
- const renameEv = common.isSunOS || common.isAIX ? 'change' : 'rename';
- assert.strictEqual(event, renameEv);
- if (expectFilePath) {
- assert.strictEqual(filename, 'newfile.txt');
- } else {
- assert.strictEqual(filename, null);
- }
- watcher.close();
- ++watchSeenThree;
- });
- }
+ function() {
+ const watcher = fs.watch(testsubdir, function(event, filename) {
+ const renameEv = common.isSunOS || common.isAIX ? 'change' : 'rename';
+ assert.strictEqual(event, renameEv);
+ if (expectFilePath) {
+ assert.strictEqual(filename, 'newfile.txt');
+ } else {
+ assert.strictEqual(filename, null);
+ }
+ watcher.close();
+ ++watchSeenThree;
+ });
+ }
);
setImmediate(function() {
diff --git a/test/sequential/test-regress-GH-877.js b/test/sequential/test-regress-GH-877.js
index 1d09c0007b..c717c2dd74 100644
--- a/test/sequential/test-regress-GH-877.js
+++ b/test/sequential/test-regress-GH-877.js
@@ -56,11 +56,11 @@ server.listen(common.PORT, '127.0.0.1', function() {
console.log(
`Socket: ${agent.sockets[addrString].length}/${
- agent.maxSockets} queued: ${
- agent.requests[addrString] ? agent.requests[addrString].length : 0}`);
+ agent.maxSockets} queued: ${
+ agent.requests[addrString] ? agent.requests[addrString].length : 0}`);
const agentRequests = agent.requests[addrString] ?
- agent.requests[addrString].length : 0;
+ agent.requests[addrString].length : 0;
if (maxQueued < agentRequests) {
maxQueued = agentRequests;
diff --git a/test/sequential/test-util-debug.js b/test/sequential/test-util-debug.js
index 68c272090a..6e20ca49d8 100644
--- a/test/sequential/test-util-debug.js
+++ b/test/sequential/test-util-debug.js
@@ -57,7 +57,7 @@ function test(environ, shouldWrite, section) {
if (shouldWrite) {
expectErr =
`${section.toUpperCase()} ${child.pid}: this { is: 'a' } /debugging/\n${
- section.toUpperCase()} ${child.pid}: num=1 str=a obj={"foo":"bar"}\n`;
+ section.toUpperCase()} ${child.pid}: num=1 str=a obj={"foo":"bar"}\n`;
}
let err = '';