diff options
Diffstat (limited to 'test/bun.js/child_process.test.ts')
-rw-r--r-- | test/bun.js/child_process.test.ts | 8 |
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()", () => { |