Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f5baaa

Browse filesBrowse files
Ayase-252danielleadams
authored andcommitted
test: improve coverage for question in readline
PR-URL: #38799 Refs: https://coverage.nodejs.org/coverage-dc43066ee9a37655/lib/readline.js.html#L443 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4e58ec4 commit 1f5baaa
Copy full SHA for 1f5baaa

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-readline-interface.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-readline-interface.js
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,18 @@ for (let i = 0; i < 12; i++) {
905905
rli.close();
906906
}
907907

908+
// Calling the question multiple times
909+
{
910+
const [rli] = getInterface({ terminal });
911+
rli.question('foo?', common.mustCall((answer) => {
912+
assert.strictEqual(answer, 'baz');
913+
}));
914+
rli.question('bar?', common.mustNotCall(() => {
915+
}));
916+
rli.write('baz\n');
917+
rli.close();
918+
}
919+
908920
// Calling the promisified question
909921
{
910922
const [rli] = getInterface({ terminal });

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.