aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/child_process.test.ts
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/child_process.test.ts
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 'test/bun.js/child_process.test.ts')
-rw-r--r--test/bun.js/child_process.test.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bun.js/child_process.test.ts b/test/bun.js/child_process.test.ts
index fecc5b961..f39629169 100644
--- a/test/bun.js/child_process.test.ts
+++ b/test/bun.js/child_process.test.ts
@@ -259,6 +259,14 @@ describe("execFileSync()", () => {
const result = execFileSync("bun", ["-v"], { encoding: "utf8" });
expect(SEMVER_REGEX.test(result.trim())).toBe(true);
});
+
+ it("should allow us to pass input to the command", () => {
+ const result = execFileSync("node", ["spawned-child.js", "STDIN"], {
+ input: "hello world!",
+ encoding: "utf8",
+ });
+ expect(result.trim()).toBe("hello world!");
+ });
});
describe("execSync()", () => {