Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
errors, readline: integrate changes from master
  • Loading branch information
slammayjammay committed Jun 7, 2017
commit 035094c9dc99643420055c1b3027dac13e1416a2
2 changes: 1 addition & 1 deletion lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

'use strict';

const errors = require('internal/errors');
const { debug, inherits } = require('util');
const Buffer = require('buffer').Buffer;
const EventEmitter = require('events');
Expand Down Expand Up @@ -57,7 +58,6 @@ const ESCAPE_DECODER = Symbol('escape-decoder');

// GNU readline library - keyseq-timeout is 500ms (default)
const ESCAPE_CODE_TIMEOUT = 500;
const errors = require('internal/errors');


function createInterface(input, output, completer, terminal) {
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-readline-csi.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ assert.throws(
() => readline.cursorTo(writable, 'a', 1),
common.expectsError({
type: Error,
message: /^Can't set cursor row without also setting it's column$/
code: 'ERR_INVALID_CURSOR_POS',
message: 'Can\'t set cursor row without setting its column'
}));
assert.strictEqual(writable.data, '');

Expand Down
6 changes: 5 additions & 1 deletion test/parallel/test-readline-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@ function isWarned(emitter) {
input: fi,
completer: 'string is not valid'
});
}, common.expectsError('ERR_INVALID_CALLBACK', TypeError));
}, common.expectsError({
type: TypeError,
code: 'ERR_INVALID_CALLBACK',
message: 'callback must be a function'
}));

// duplicate lines are removed from history when
// `options.removeHistoryDuplicates` is `true`
Expand Down