From c0262c1561aaa5964996f1f023daae4999a57e4f Mon Sep 17 00:00:00 2001 From: Emil Tayeb <49617556+Emiltayeb@users.noreply.github.com> Date: Sun, 28 Jul 2024 09:22:10 +0300 Subject: [PATCH] test_runner: switched to internal readline interface Switched to using internal interface after PR-URL: https://github.com/nodejs/node/pull/54000 Reviewed-By: Chemi Atlow Reviewed-By: Moshe Atlow Reviewed-By: Benjamin Gruenbaum --- lib/internal/test_runner/runner.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index c761e3616f964d..a68a4d33e5b1ff 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -31,8 +31,7 @@ const { spawn } = require('child_process'); const { readdirSync, statSync } = require('fs'); const { finished } = require('internal/streams/end-of-stream'); const { DefaultDeserializer, DefaultSerializer } = require('v8'); -// TODO(aduh95): switch to internal/readline/interface when backporting to Node.js 16.x is no longer a concern. -const { createInterface } = require('readline'); +const { Interface } = require('internal/readline/interface'); const { deserializeError } = require('internal/error_serdes'); const { Buffer } = require('buffer'); const { FilesWatcher } = require('internal/watch_mode/files_watcher'); @@ -394,7 +393,7 @@ function runTestFile(path, filesWatcher, opts) { subtest.parseMessage(data); }); - const rl = createInterface({ __proto__: null, input: child.stderr }); + const rl = new Interface({ __proto__: null, input: child.stderr }); rl.on('line', (line) => { if (isInspectorMessage(line)) { process.stderr.write(line + '\n');