diff options
author | 2022-12-11 07:51:02 +0200 | |
---|---|---|
committer | 2022-12-10 21:51:02 -0800 | |
commit | 780f7de843c42bf9a32f39a1192289c367015138 (patch) | |
tree | eb794d6edff2f726cc63fcc74a04f643953a4568 /test/bun.js/process-stdio.test.ts | |
parent | 660eb46b17060019de65989e52aabf6994213020 (diff) | |
download | bun-780f7de843c42bf9a32f39a1192289c367015138.tar.gz bun-780f7de843c42bf9a32f39a1192289c367015138.tar.zst bun-780f7de843c42bf9a32f39a1192289c367015138.zip |
override `process.stdin.on()` correctly (#1603)
* override `process.stdin.on()` correctly
fixes #1601
* add tests
Diffstat (limited to 'test/bun.js/process-stdio.test.ts')
-rw-r--r-- | test/bun.js/process-stdio.test.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bun.js/process-stdio.test.ts b/test/bun.js/process-stdio.test.ts index 886bf9dac..45db37d05 100644 --- a/test/bun.js/process-stdio.test.ts +++ b/test/bun.js/process-stdio.test.ts @@ -3,6 +3,12 @@ import { describe, expect, it, test } from "bun:test"; import { bunExe } from "bunExe"; import { isatty } from "tty"; +test("process.stdin", () => { + expect(process.stdin).toBeDefined(); + expect(process.stdin.on("close", function() {})).toBe(process.stdin); + expect(process.stdin.once("end", function() {})).toBe(process.stdin); +}); + test("process.stdout", () => { expect(process.stdout).toBeDefined(); expect(process.stdout.isTTY).toBe(isatty(1)); |