Skip to content

Commit

Permalink
test: improve lib/readline.js coverage
Browse files Browse the repository at this point in the history
PR-URL: #42686
Refs: https://coverage.nodejs.org/coverage-a0461255c05c79cf/lib/readline.js.html#L105
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
fossamagna authored and juanarbol committed Oct 11, 2022
1 parent 891c4e7 commit f13e06a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/parallel/test-readline-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ function assertCursorRowsAndCols(rli, rows, cols) {
assert(rl instanceof readline.Interface);
}

{
const fi = new FakeInput();
const rli = new readline.Interface(
fi,
fi,
common.mustCall((line) => [[], line]),
true,
);
assert(rli instanceof readline.Interface);
fi.emit('data', 'a\t');
rli.close();
}

[
undefined,
50,
Expand Down

0 comments on commit f13e06a

Please sign in to comment.