diff options
author | Teddy Katz <teddy.katz@gmail.com> | 2016-09-18 01:43:49 -0400 |
---|---|---|
committer | Teddy Katz <teddy.katz@gmail.com> | 2016-09-20 23:21:10 -0400 |
commit | b1b1978ec5a533607c5c2decaec44f00ff0a80b4 (patch) | |
tree | e86a9a4c5739cee17ae8db011acf30fccd9d8e0f /test/parallel | |
parent | 66df5d147f65cc1a36098987e2d6131c5403c0fc (diff) | |
download | android-node-v8-b1b1978ec5a533607c5c2decaec44f00ff0a80b4.tar.gz android-node-v8-b1b1978ec5a533607c5c2decaec44f00ff0a80b4.tar.bz2 android-node-v8-b1b1978ec5a533607c5c2decaec44f00ff0a80b4.zip |
tools: add additional ESLint rules
PR-URL: https://github.com/nodejs/node/pull/8643
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@keybase.io>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-debug-protocol-execute.js | 4 | ||||
-rw-r--r-- | test/parallel/test-http-multi-line-headers.js | 2 | ||||
-rw-r--r-- | test/parallel/test-http-response-multi-content-length.js | 2 | ||||
-rw-r--r-- | test/parallel/test-http-response-multiheaders.js | 2 | ||||
-rw-r--r-- | test/parallel/test-regress-GH-5727.js | 2 | ||||
-rw-r--r-- | test/parallel/test-repl.js | 4 | ||||
-rw-r--r-- | test/parallel/test-stream2-writable.js | 4 | ||||
-rw-r--r-- | test/parallel/test-tls-cipher-list.js | 6 | ||||
-rw-r--r-- | test/parallel/test-tls-client-verify.js | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/test/parallel/test-debug-protocol-execute.js b/test/parallel/test-debug-protocol-execute.js index e87b25f5cb..2283a3c54e 100644 --- a/test/parallel/test-debug-protocol-execute.js +++ b/test/parallel/test-debug-protocol-execute.js @@ -15,6 +15,6 @@ assert.strictEqual(protocol.res.body, undefined); protocol.state = 'sterrance'; assert.throws( - () => { protocol.execute('grumblecakes'); }, - /^Error: Unknown state$/ + () => { protocol.execute('grumblecakes'); }, + /^Error: Unknown state$/ ); diff --git a/test/parallel/test-http-multi-line-headers.js b/test/parallel/test-http-multi-line-headers.js index f534b3b8db..df333cdd62 100644 --- a/test/parallel/test-http-multi-line-headers.js +++ b/test/parallel/test-http-multi-line-headers.js @@ -14,7 +14,7 @@ var server = net.createServer(function(conn) { 'Content-Length: ' + body.length + '\r\n' + 'Content-Type: text/plain;\r\n' + ' x-unix-mode=0600;\r\n' + - ' name=\"hello.txt\"\r\n' + + ' name="hello.txt"\r\n' + '\r\n' + body; diff --git a/test/parallel/test-http-response-multi-content-length.js b/test/parallel/test-http-response-multi-content-length.js index 098061002b..3290f74c16 100644 --- a/test/parallel/test-http-response-multi-content-length.js +++ b/test/parallel/test-http-response-multi-content-length.js @@ -27,7 +27,7 @@ const server = http.createServer((req, res) => { var count = 0; server.listen(0, common.mustCall(() => { - for (let n = 1; n <= MAX_COUNT ; n++) { + for (let n = 1; n <= MAX_COUNT; n++) { // This runs twice, the first time, the server will use // setHeader, the second time it uses writeHead. In either // case, the error handler must be called because the client diff --git a/test/parallel/test-http-response-multiheaders.js b/test/parallel/test-http-response-multiheaders.js index 577f401abb..f4c1fd4116 100644 --- a/test/parallel/test-http-response-multiheaders.js +++ b/test/parallel/test-http-response-multiheaders.js @@ -48,7 +48,7 @@ const server = http.createServer(function(req, res) { server.listen(0, common.mustCall(function() { var count = 0; - for (let n = 1; n <= 2 ; n++) { + for (let n = 1; n <= 2; n++) { // this runs twice, the first time, the server will use // setHeader, the second time it uses writeHead. The // result on the client side should be the same in diff --git a/test/parallel/test-regress-GH-5727.js b/test/parallel/test-regress-GH-5727.js index ae8cca9cbf..3f52c55e7a 100644 --- a/test/parallel/test-regress-GH-5727.js +++ b/test/parallel/test-regress-GH-5727.js @@ -4,7 +4,7 @@ const assert = require('assert'); const net = require('net'); const invalidPort = -1 >>> 0; -const errorMessage = /"port" argument must be \>= 0 and \< 65536/; +const errorMessage = /"port" argument must be >= 0 and < 65536/; net.Server().listen(common.PORT, function() { const address = this.address(); diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 495125f6dc..a6603332aa 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -160,7 +160,7 @@ function error_test() { // invalid RegExps are a special case of syntax error, // should throw { client: client_unix, send: '/(/;', - expect: /\bSyntaxError: Invalid regular expression\:/ }, + expect: /\bSyntaxError: Invalid regular expression:/ }, // invalid RegExp modifiers are a special case of syntax error, // should throw (GH-4012) { client: client_unix, send: 'new RegExp("foo", "wrong modifier");', @@ -313,7 +313,7 @@ function error_test() { { client: client_unix, send: "function x(s) {\nreturn s.replace(/'/,'');\n}", expect: prompt_multiline + prompt_multiline + 'undefined\n' + prompt_unix }, - { client: client_unix, send: "function x(s) {\nreturn s.replace(/\'/,'');\n}", + { client: client_unix, send: "function x(s) {\nreturn s.replace(/'/,'');\n}", expect: prompt_multiline + prompt_multiline + 'undefined\n' + prompt_unix }, { client: client_unix, send: 'function x(s) {\nreturn s.replace(/"/,"");\n}', diff --git a/test/parallel/test-stream2-writable.js b/test/parallel/test-stream2-writable.js index 57877b048b..050c2121b2 100644 --- a/test/parallel/test-stream2-writable.js +++ b/test/parallel/test-stream2-writable.js @@ -154,7 +154,7 @@ test('write bufferize', function(t) { }); chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; + var enc = encodings[i % encodings.length]; chunk = Buffer.from(chunk); tw.write(chunk.toString(enc), enc); }); @@ -192,7 +192,7 @@ test('write no bufferize', function(t) { }); chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; + var enc = encodings[i % encodings.length]; chunk = Buffer.from(chunk); tw.write(chunk.toString(enc), enc); }); diff --git a/test/parallel/test-tls-cipher-list.js b/test/parallel/test-tls-cipher-list.js index ba844c944e..44ebd3d2f8 100644 --- a/test/parallel/test-tls-cipher-list.js +++ b/test/parallel/test-tls-cipher-list.js @@ -16,9 +16,9 @@ function doCheck(arg, check) { '-pe', 'require("crypto").constants.defaultCipherList' ]); - spawn(process.execPath, arg, {}). - on('error', common.fail). - stdout.on('data', function(chunk) { + spawn(process.execPath, arg, {}) + .on('error', common.fail) + .stdout.on('data', function(chunk) { out += chunk; }).on('end', function() { assert.equal(out.trim(), check); diff --git a/test/parallel/test-tls-client-verify.js b/test/parallel/test-tls-client-verify.js index e566cafc8c..7844253db9 100644 --- a/test/parallel/test-tls-client-verify.js +++ b/test/parallel/test-tls-client-verify.js @@ -10,7 +10,7 @@ var tls = require('tls'); var fs = require('fs'); -var hosterr = /Hostname\/IP doesn\'t match certificate\'s altnames/g; +var hosterr = /Hostname\/IP doesn't match certificate's altnames/g; var testCases = [{ ca: ['ca1-cert'], key: 'agent2-key', |