Skip to content

Commit 8131d38

Browse files
authored
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. PR-URL: #60226 Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 2b83f00 commit 8131d38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ tmpdir.refresh();
8181

8282
r.input.run([{ name: 'down' }]);
8383
assert.strictEqual(r.cursor, 27);
84+
85+
r.close();
8486
});
8587

8688
repl.createInternalRepl(
@@ -142,6 +144,8 @@ tmpdir.refresh();
142144

143145
r.input.run([{ name: 'down' }]);
144146
assert.strictEqual(r.cursor, 55);
147+
148+
r.close();
145149
});
146150

147151
repl.createInternalRepl(
@@ -185,6 +189,8 @@ tmpdir.refresh();
185189
r.input.run([{ name: 'up' }]);
186190
// Check that the line is properly displayed
187191
assert.strictEqual(r.line, 'let lineWithMistake = `I have some\nproblem with my syntax`');
192+
193+
r.close();
188194
});
189195

190196
repl.createInternalRepl(
@@ -232,6 +238,8 @@ tmpdir.refresh();
232238
' 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,\n' +
233239
' 123\n' +
234240
']\n'), true);
241+
242+
r.close();
235243
});
236244

237245
repl.createInternalRepl(

0 commit comments

Comments
 (0)