From 499f317adec7e9d3d0cbf42b46bca2d8f5d5dd7d Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Fri, 16 Sep 2022 06:58:39 +0900 Subject: [PATCH] test: improve lib/readline.js coverage PR-URL: https://github.com/nodejs/node/pull/42686 Refs: https://coverage.nodejs.org/coverage-a0461255c05c79cf/lib/readline.js.html#L105 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Moshe Atlow --- test/parallel/test-readline-interface.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index fe684f9563855c..c4f97ba37598d4 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -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,