diff --git a/lib/buffer.js b/lib/buffer.js index eff91be2882630..3fe08c81b91ebf 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -263,6 +263,7 @@ function byteLength(string, encoding) { case 'ascii': case 'binary': // Deprecated + // eslint-disable-next-line no-fallthrough case 'raw': case 'raws': return len; diff --git a/lib/readline.js b/lib/readline.js index 74656896314531..2e799e21a3233a 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -977,6 +977,7 @@ exports.emitKeypressEvents = emitKeypressEvents; */ // 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 ac6ab92c17c072..fd58892350bc2a 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',