repl: fix autocomplete while using .load · nodejs/node@cbd586a · GitHub
Skip to content

Commit cbd586a

Browse files
BridgeARtargos
authored andcommitted
repl: fix autocomplete while using .load
This makes sure that complete functions work as expected after using the REPL's `.load` command. It also fixes the corresponding test. So far the assertion where swallowed and the test passed even though it should not have. Fixes: #28546 PR-URL: #28608 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Lance Ball <lball@redhat.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 506b50a commit cbd586a

3 files changed

Lines changed: 72 additions & 67 deletions

File tree

lib/repl.js

Lines changed: 10 additions & 13 deletions

test/parallel/test-repl-load-multiline.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const expected = `${command}
1313
const getLunch = () =>
1414
placeOrder('tacos')
1515
.then(eat);
16+
1617
const placeOrder = (order) => Promise.resolve(order);
1718
const eat = (food) => '<nom nom nom>';
1819

test/parallel/test-repl-save-load.js

Lines changed: 61 additions & 54 deletions

0 commit comments

Comments
 (0)