Browse Source

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>
process-exit-stdio-flushing
Rich Trott 9 years ago
parent
commit
1027b9447e
  1. 1
      lib/internal/readline.js
  2. 7
      test/parallel/test-http-destroyed-socket-write2.js

1
lib/internal/readline.js

@ -1,6 +1,7 @@
'use strict'; 'use strict';
// Regexes used for ansi escape code splitting // Regexes used for ansi escape code splitting
// eslint-disable-next-line no-control-regex
const metaKeyCodeReAnywhere = /(?:\x1b)([a-zA-Z0-9])/; const metaKeyCodeReAnywhere = /(?:\x1b)([a-zA-Z0-9])/;
const functionKeyCodeReAnywhere = new RegExp('(?:\x1b+)(O|N|\\[|\\[\\[)(?:' + [ const functionKeyCodeReAnywhere = new RegExp('(?:\x1b+)(O|N|\\[|\\[\\[)(?:' + [
'(\\d+)(?:;(\\d+))?([~^$])', '(\\d+)(?:;(\\d+))?([~^$])',

7
test/parallel/test-http-destroyed-socket-write2.js

@ -29,12 +29,17 @@ server.listen(common.PORT, function() {
switch (er.code) { switch (er.code) {
// This is the expected case // This is the expected case
case 'ECONNRESET': case 'ECONNRESET':
// On windows this sometimes manifests as ECONNABORTED break;
// On Windows, this sometimes manifests as ECONNABORTED
case 'ECONNABORTED': case 'ECONNABORTED':
break;
// This test is timing sensitive so an EPIPE is not out of the question. // 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. // It should be infrequent, given the 50 ms timeout, but not impossible.
case 'EPIPE': case 'EPIPE':
break; break;
default: default:
assert.strictEqual(er.code, assert.strictEqual(er.code,
'ECONNRESET', 'ECONNRESET',

Loading…
Cancel
Save