summaryrefslogtreecommitdiff
path: root/js/process_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/process_test.ts')
-rw-r--r--js/process_test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/process_test.ts b/js/process_test.ts
index 6cba1a1b7..ca2a4a64a 100644
--- a/js/process_test.ts
+++ b/js/process_test.ts
@@ -176,3 +176,14 @@ testPerm({ run: true }, async function runStderrPiped() {
assertEqual(status.signal, undefined);
p.close();
});
+
+testPerm({ run: true }, async function runOutput() {
+ const p = run({
+ args: ["python", "-c", "import sys; sys.stdout.write('hello')"],
+ stdout: "piped"
+ });
+ const output = await p.output();
+ const s = new TextDecoder().decode(output);
+ assertEqual(s, "hello");
+ p.close();
+});