diff options
Diffstat (limited to 'std/node/process_test.ts')
-rw-r--r-- | std/node/process_test.ts | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/std/node/process_test.ts b/std/node/process_test.ts index 4055dfd78..a277eaa07 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -18,8 +18,11 @@ Deno.test({ allKeys.delete("process"); // without esm default allKeys.delete("default"); - // with on, which is not exported via * + // with on, stdin, stderr, and stdout, which is not exported via * allKeys.add("on"); + allKeys.add("stdin"); + allKeys.add("stderr"); + allKeys.add("stdout"); const allStr = Array.from(allKeys).sort().join(" "); assertEquals(Object.keys(all.default).sort().join(" "), allStr); assertEquals(Object.keys(all.process).sort().join(" "), allStr); @@ -130,3 +133,33 @@ Deno.test({ assertEquals(typeof env.PATH, "string"); }, }); + +Deno.test({ + name: "process.stdin", + fn() { + assertEquals(typeof process.stdin.fd, "number"); + assertEquals(process.stdin.fd, Deno.stdin.rid); + // TODO(jayhelton) Uncomment out this assertion once PTY is supported + //assert(process.stdin.isTTY); + }, +}); + +Deno.test({ + name: "process.stdout", + fn() { + assertEquals(typeof process.stdout.fd, "number"); + assertEquals(process.stdout.fd, Deno.stdout.rid); + // TODO(jayhelton) Uncomment out this assertion once PTY is supported + // assert(process.stdout.isTTY); + }, +}); + +Deno.test({ + name: "process.stderr", + fn() { + assertEquals(typeof process.stderr.fd, "number"); + assertEquals(process.stderr.fd, Deno.stderr.rid); + // TODO(jayhelton) Uncomment out this assertion once PTY is supported + // assert(process.stderr.isTTY); + }, +}); |