diff options
author | Rich Trott <rtrott@gmail.com> | 2021-04-22 10:40:12 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2021-04-25 01:50:12 -0700 |
commit | c6b4ab0d9f7249d75da1473a1c962e3b2e5d0b74 (patch) | |
tree | 3a780dcb7937cd11277f8ddb38a46bf64a0eddf7 | |
parent | c4c9614e9611c3693c2a86c4231c929e2bc49490 (diff) | |
download | node-new-c6b4ab0d9f7249d75da1473a1c962e3b2e5d0b74.tar.gz |
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
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>
-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 1dbe4f37b4..b55a2d078e 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) { |