diff options
author | Rich Trott <rtrott@gmail.com> | 2021-04-22 20:40:12 +0300 |
---|---|---|
committer | Richard Lau <rlau@redhat.com> | 2021-07-20 14:11:16 +0300 |
commit | 193ea8fd912758879824f0b797fed847999e4826 (patch) | |
tree | a26bd0035a460c5fe9a128fb1a8e8798c254c8c0 /deps | |
parent | 22afb7cbe695b47eee1f79da356cb24be926e016 (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.js | 4 |
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) { |