diff options
Diffstat (limited to 'test/bun.js/spawn-streaming-stdout.test.ts')
-rw-r--r-- | test/bun.js/spawn-streaming-stdout.test.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/bun.js/spawn-streaming-stdout.test.ts b/test/bun.js/spawn-streaming-stdout.test.ts index 1d19fe5da..fac696087 100644 --- a/test/bun.js/spawn-streaming-stdout.test.ts +++ b/test/bun.js/spawn-streaming-stdout.test.ts @@ -2,9 +2,12 @@ import { it, test, expect } from "bun:test"; import { spawn } from "bun"; import { bunExe } from "./bunExe"; import { gcTick } from "gc"; +import { closeSync, openSync } from "fs"; test("spawn can read from stdout multiple chunks", async () => { gcTick(true); + const maxFD = openSync("/dev/null", "w"); + closeSync(maxFD); for (let i = 0; i < 10; i++) await (async function () { @@ -33,4 +36,8 @@ test("spawn can read from stdout multiple chunks", async () => { expect(counter).toBe(4); await exited; })(); + + const newMaxFD = openSync("/dev/null", "w"); + closeSync(newMaxFD); + expect(newMaxFD).toBe(maxFD); }); |