aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/spawned-child.js
diff options
context:
space:
mode:
authorGravatar Derrick Farris <mr.dcfarris@gmail.com> 2022-11-09 20:10:29 -0600
committerGravatar GitHub <noreply@github.com> 2022-11-09 18:10:29 -0800
commit7f5022db0ca839262a862f8e2c8012145c4f90f5 (patch)
tree21a63b36a0bfca79830a3a4891af7a38de85cb13 /test/bun.js/spawned-child.js
parent9ea025c5430d2ed227d61b5f92cd3d6f46d209bd (diff)
downloadbun-7f5022db0ca839262a862f8e2c8012145c4f90f5.tar.gz
bun-7f5022db0ca839262a862f8e2c8012145c4f90f5.tar.zst
bun-7f5022db0ca839262a862f8e2c8012145c4f90f5.zip
fix(child_process): fix execFileSync options.input (#1479)
* fix(child_process): fix execFileSync options.input * fix(child_process): debug err, check for Uint8Array too * fix(child_process): fix ArrayBufferIsView call * test(child_process): fix missing toString() call on test result * refactor(child_process): change options.input to input to getter calls
Diffstat (limited to '')
-rw-r--r--test/bun.js/spawned-child.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/bun.js/spawned-child.js b/test/bun.js/spawned-child.js
index 757aacd5c..c70aeab16 100644
--- a/test/bun.js/spawned-child.js
+++ b/test/bun.js/spawned-child.js
@@ -1 +1,11 @@
-setTimeout(() => console.log("hello"), 150);
+if (process.argv[2] === "STDIN") {
+ let result = "";
+ process.stdin.on("data", (data) => {
+ result += data;
+ });
+ process.stdin.on("close", () => {
+ console.log(result);
+ });
+} else {
+ setTimeout(() => console.log("hello"), 150);
+}