diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 80e3063fe33bb3..4684975bea6bad 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -895,6 +895,18 @@ for (let i = 0; i < 12; i++) { rli.close(); } + // Calling the question multiple times + { + const [rli] = getInterface({ terminal }); + rli.question('foo?', common.mustCall((answer) => { + assert.strictEqual(answer, 'baz'); + })); + rli.question('bar?', common.mustNotCall(() => { + })); + rli.write('baz\n'); + rli.close(); + } + // Can create a new readline Interface with a null output argument { const [rli, fi] = getInterface({ output: null, terminal });