diff options
author | 2023-09-28 03:53:24 -0700 | |
---|---|---|
committer | 2023-09-28 03:53:24 -0700 | |
commit | 387f1260c9dc0cea667b44ec0152fff0cd4def25 (patch) | |
tree | 24dde83cf812481b6d1c8de316a30ece7b745a54 /test/js/node/stream/node-stream.test.js | |
parent | e60b3607c12c91959ec795228cc299703d5b09d0 (diff) | |
download | bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.gz bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.tar.zst bun-387f1260c9dc0cea667b44ec0152fff0cd4def25.zip |
Get Next.js Pages Router to work (#6095)
* hell
* make it so bun-debug-src
* teag
* wild
* yippee
* fas
* fix async hooks assertions
* yap
* yeah that's wild
* aa
* a
* increase time allowed
* so trivial
Diffstat (limited to 'test/js/node/stream/node-stream.test.js')
-rw-r--r-- | test/js/node/stream/node-stream.test.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/js/node/stream/node-stream.test.js b/test/js/node/stream/node-stream.test.js index bc6a4fcfb..ddbd2bc7a 100644 --- a/test/js/node/stream/node-stream.test.js +++ b/test/js/node/stream/node-stream.test.js @@ -197,6 +197,7 @@ describe("PassThrough", () => { const ttyStreamsTest = ` import tty from "tty"; +import fs from "fs"; import { dlopen } from "bun:ffi"; @@ -278,10 +279,11 @@ describe("TTY", () => { close(child_fd); }); it("process.stdio tty", () => { - expect(process.stdin instanceof tty.ReadStream).toBe(true); + // this isnt run in a tty, so stdin will not appear to be a tty + expect(process.stdin instanceof fs.ReadStream).toBe(true); expect(process.stdout instanceof tty.WriteStream).toBe(true); expect(process.stderr instanceof tty.WriteStream).toBe(true); - expect(process.stdin.isTTY).toBeDefined(); + expect(process.stdin.isTTY).toBeUndefined(); expect(process.stdout.isTTY).toBeDefined(); expect(process.stderr.isTTY).toBeDefined(); }); @@ -311,7 +313,11 @@ it("TTY streams", () => { }); expect(stdout.toString()).toBe(""); - expect(stderr.toString()).toContain("0 fail"); + try { + expect(stderr.toString()).toContain("0 fail"); + } catch (error) { + throw new Error(stderr.toString()); + } expect(exitCode).toBe(0); }); |