From aa6fac68da9b1d42123f0d56f60f39dc43d85d84 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 25 Jul 2017 10:37:08 -0700 Subject: 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 Reviewed-By: Vse Mozhet Byt Reviewed-By: Trevor Norris --- test/sequential/test-fs-watch.js | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'test/sequential/test-fs-watch.js') 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() { -- cgit v1.2.3