Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-04-22 20:40:12 +0300
committerRichard Lau <rlau@redhat.com>2021-07-20 14:11:16 +0300
commit193ea8fd912758879824f0b797fed847999e4826 (patch)
treea26bd0035a460c5fe9a128fb1a8e8798c254c8c0 /deps
parent22afb7cbe695b47eee1f79da356cb24be926e016 (diff)
test: fix test-inspector-cli-address
The test was assuming that the entire string being sought would arrive in a single data chunk, but it can be split across multiple chunks. PR-URL: https://github.com/nodejs/node/pull/38161 Backport-PR-URL: https://github.com/nodejs/node/pull/38858 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/node-inspect/test/cli/address.test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/node-inspect/test/cli/address.test.js b/deps/node-inspect/test/cli/address.test.js
index 1dbe4f37b42..b55a2d078ea 100644
--- a/deps/node-inspect/test/cli/address.test.js
+++ b/deps/node-inspect/test/cli/address.test.js
@@ -16,7 +16,9 @@ function launchTarget(...args) {
};
childProc.on('exit', onExit);
childProc.stderr.setEncoding('utf8');
- childProc.stderr.on('data', (data) => {
+ let data = '';
+ childProc.stderr.on('data', (chunk) => {
+ data += chunk;
const ret = kDebuggerMsgReg.exec(data);
childProc.removeListener('exit', onExit);
if (ret) {