mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
Add failing test
This commit is contained in:
@@ -9,12 +9,46 @@ import { mkfifo } from "mkfifo";
|
||||
import { unlinkSync, writeFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { gc } from "./gc";
|
||||
new Uint8Array();
|
||||
|
||||
beforeEach(() => gc());
|
||||
afterEach(() => gc());
|
||||
|
||||
describe("ReadableStream.prototype.tee", async () => {
|
||||
// This test hangs, TODO: fix it
|
||||
// describe("WritableStream", () => {
|
||||
// it("works", async () => {
|
||||
// try {
|
||||
// var chunks = [];
|
||||
// var writable = new WritableStream({
|
||||
// write(chunk, controller) {
|
||||
// chunks.push(chunk);
|
||||
// },
|
||||
// close(er) {
|
||||
// console.log("closed");
|
||||
// console.log(er);
|
||||
// },
|
||||
// abort(reason) {
|
||||
// console.log("aborted!");
|
||||
// console.log(reason);
|
||||
// },
|
||||
// });
|
||||
// var writer = writable.getWriter();
|
||||
|
||||
// writer.write(new Uint8Array([1, 2, 3]));
|
||||
// writer.write(new Uint8Array([4, 5, 6]));
|
||||
// await writer.close();
|
||||
|
||||
// expect(JSON.stringify(Array.from(Buffer.concat(chunks)))).toBe(
|
||||
// JSON.stringify([1, 2, 3, 4, 5, 6])
|
||||
// );
|
||||
// } catch (e) {
|
||||
// console.log(e);
|
||||
// console.log(e.stack);
|
||||
// throw e;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
describe("ReadableStream.prototype.tee", () => {
|
||||
it("class", () => {
|
||||
const [a, b] = new ReadableStream().tee();
|
||||
expect(a instanceof ReadableStream).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user