Skip to content

Commit

Permalink
WIP: update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PolarETech committed Jan 20, 2023
1 parent fc94152 commit 9ee0509
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions node/process_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,26 @@ Deno.test({
},
});

Deno.test({
name: "process.stdin readable with null",
async fn() {
const expected = ["65536", "null", "end"];

const scriptPath = "./node/testdata/process_stdin.ts";

const command = new Deno.Command(Deno.execPath(), {
args: ["run", scriptPath],
stdin: "null",
stdout: "piped",
stderr: "null",
});

const { stdout } = await command.output();
const data = new TextDecoder().decode(stdout).trim().split("\n");
assertEquals(data, expected);
},
});

Deno.test({
name: "process.stdout",
fn() {
Expand Down

0 comments on commit 9ee0509

Please sign in to comment.