aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/child-process-stdio.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-11 12:58:48 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-11 12:58:48 -0800
commitb5519af7e7cc9e3812bdeb16d6f21f4a2b9c251d (patch)
tree5d6f710f2b766a5b7346608bda1b8941559dbf4e /test/bun.js/child-process-stdio.test.js
parent9d94f148dca8aa683151845960f93521861a5d02 (diff)
downloadbun-b5519af7e7cc9e3812bdeb16d6f21f4a2b9c251d.tar.gz
bun-b5519af7e7cc9e3812bdeb16d6f21f4a2b9c251d.tar.zst
bun-b5519af7e7cc9e3812bdeb16d6f21f4a2b9c251d.zip
cleanup some tests
Diffstat (limited to 'test/bun.js/child-process-stdio.test.js')
-rw-r--r--test/bun.js/child-process-stdio.test.js22
1 files changed, 6 insertions, 16 deletions
diff --git a/test/bun.js/child-process-stdio.test.js b/test/bun.js/child-process-stdio.test.js
index 75ab0e49f..9969473be 100644
--- a/test/bun.js/child-process-stdio.test.js
+++ b/test/bun.js/child-process-stdio.test.js
@@ -4,21 +4,11 @@ import { spawn, execSync } from "node:child_process";
const CHILD_PROCESS_FILE = import.meta.dir + "/spawned-child.js";
const OUT_FILE = import.meta.dir + "/stdio-test-out.txt";
-// describe("process.stdout", () => {
-// // it("should allow us to write to it", () => {
-// // process.stdout.write("Bun is cool\n");
-// // });
-// // it("should allow us to use a file as stdout", () => {
-// // const output = "Bun is cool\n";
-// // execSync(`rm -f ${OUT_FILE}`);
-// // const result = execSync(`bun ${CHILD_PROCESS_FILE} STDOUT > ${OUT_FILE}`, {
-// // encoding: "utf8",
-// // stdin,
-// // });
-// // expect(result).toBe(output);
-// // expect(readSync(OUT_FILE)).toBe(output);
-// // });
-// });
+describe("process.stdout", () => {
+ it("should allow us to write to it", () => {
+ process.stdout.write("Bun is cool\n");
+ });
+});
describe("process.stdin", () => {
it("should allow us to read from stdin in readable mode", (done) => {
@@ -75,6 +65,6 @@ describe("process.stdin", () => {
}/readFileSync.txt`,
{ encoding: "utf8" },
);
- expect(result.trim()).toEqual("File read successfully");
+ expect(result.trim()).toEqual("data: File read successfully");
});
});