From 57da92f453c4250bf666a1327bd69f209e4cbeda Mon Sep 17 00:00:00 2001 From: sangwook Date: Sun, 12 Oct 2025 17:05:11 +0900 Subject: [PATCH] test: add missing r.close() calls in REPL multiline tests Adds missing REPL instance cleanup calls to prevent resource leaks in test/parallel/test-repl-multiline-navigation.js. Each test now properly closes the REPL instance after testing cursor navigation. --- test/parallel/test-repl-multiline-navigation.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/parallel/test-repl-multiline-navigation.js b/test/parallel/test-repl-multiline-navigation.js index 3e5a40186b3062..7bcef887597595 100644 --- a/test/parallel/test-repl-multiline-navigation.js +++ b/test/parallel/test-repl-multiline-navigation.js @@ -81,6 +81,8 @@ tmpdir.refresh(); r.input.run([{ name: 'down' }]); assert.strictEqual(r.cursor, 27); + + r.close(); }); repl.createInternalRepl( @@ -142,6 +144,8 @@ tmpdir.refresh(); r.input.run([{ name: 'down' }]); assert.strictEqual(r.cursor, 55); + + r.close(); }); repl.createInternalRepl( @@ -185,6 +189,8 @@ tmpdir.refresh(); r.input.run([{ name: 'up' }]); // Check that the line is properly displayed assert.strictEqual(r.line, 'let lineWithMistake = `I have some\nproblem with my syntax`'); + + r.close(); }); repl.createInternalRepl( @@ -232,6 +238,8 @@ tmpdir.refresh(); ' 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,\n' + ' 123\n' + ']\n'), true); + + r.close(); }); repl.createInternalRepl(