diff options
author | Rich Trott <rtrott@gmail.com> | 2016-04-30 22:23:09 -0700 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2016-05-17 08:09:59 -0500 |
commit | 559c2583e0589a322087b85e51cc140c5f7fb5fa (patch) | |
tree | d5749c46d2c72903a2da8efe48d9770b8bd59827 | |
parent | ceeae4b18007f2c09b0829df3bea7cb3f265d8c1 (diff) | |
download | node-new-559c2583e0589a322087b85e51cc140c5f7fb5fa.tar.gz |
lib,test: update in preparation for linter update
ESLint 2.9.0 fixes some bugs that resulted in minor issues not being
caught by ESLint 2.7.0. Update instances of our code that will be
flagged when we upgrade to ESLint 2.9.0.
PR-URL: https://github.com/nodejs/node/pull/6498
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
-rw-r--r-- | lib/internal/readline.js | 1 | ||||
-rw-r--r-- | test/parallel/test-http-destroyed-socket-write2.js | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/internal/readline.js b/lib/internal/readline.js index 3248c7c50a..1cc0b58d67 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -1,6 +1,7 @@ 'use strict'; // Regexes used for ansi escape code splitting +// eslint-disable-next-line no-control-regex const metaKeyCodeReAnywhere = /(?:\x1b)([a-zA-Z0-9])/; const functionKeyCodeReAnywhere = new RegExp('(?:\x1b+)(O|N|\\[|\\[\\[)(?:' + [ '(\\d+)(?:;(\\d+))?([~^$])', diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 771fd30359..7588393840 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -29,12 +29,17 @@ server.listen(common.PORT, function() { switch (er.code) { // This is the expected case case 'ECONNRESET': - // On windows this sometimes manifests as ECONNABORTED + break; + + // On Windows, this sometimes manifests as ECONNABORTED case 'ECONNABORTED': + break; + // This test is timing sensitive so an EPIPE is not out of the question. // It should be infrequent, given the 50 ms timeout, but not impossible. case 'EPIPE': break; + default: assert.strictEqual(er.code, 'ECONNRESET', |