Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions test-parity/known_failures.json
Original file line number Diff line number Diff line change
Expand Up @@ -1705,5 +1705,23 @@
"added": "2026-05-23",
"category": "bug-open",
"reason": "node:stream/web: pipeTo preventCancel option behavior not implemented. Flips to PASS when #1545 lands."
},
"node-suite/stream/duplex-pair/wired-comms": {
"issue": "1532",
"added": "2026-05-23",
"category": "bug-open",
"reason": "node:stream: duplexPair() — fails to compile (export not yet wired through perry-stdlib stream re-exports). Flips to PASS when #1532 lands."
},
"node-suite/stream/finished/error-false-option": {
"issue": "1532",
"added": "2026-05-23",
"category": "bug-open",
"reason": "node:stream: finished({error:false}) option ignored — callback still fires on destroy(err). Flips to PASS when #1532 lands."
},
"node-suite/stream/compose/single-sync-fn": {
"issue": "1531",
"added": "2026-05-23",
"category": "bug-open",
"reason": "node:stream: compose(readable, asyncGenFn) — fails to compile (single-fn compose form not yet wired). Flips to PASS when #1531 lands."
}
}
10 changes: 10 additions & 0 deletions test-parity/node-suite/stream/compose/single-sync-fn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { compose, Readable } from "node:stream";
// compose() accepts a single async-generator function and turns it into
// a stream pipeline. Source is a Readable; sink is the generator output.
async function* upper(src: AsyncIterable<any>) {
for await (const c of src) yield String(c).toUpperCase();
}
const out: string[] = [];
const composed: any = compose(Readable.from(["a", "b", "c"]), upper as any);
composed.on("data", (c: any) => out.push(String(c)));
composed.on("end", () => console.log("composed:", out.join(",")));
10 changes: 10 additions & 0 deletions test-parity/node-suite/stream/duplex-pair/wired-comms.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { duplexPair } from "node:stream";
// duplexPair() returns two paired Duplex streams: data written to one
// appears as readable data on the other (bidirectional in-memory pipe).
const [a, b] = (duplexPair as any)();
const chunks: string[] = [];
b.on("data", (c: any) => chunks.push(String(c)));
b.on("end", () => console.log("b got:", chunks.join("|")));
a.write("hello ");
a.write("world");
a.end();
13 changes: 13 additions & 0 deletions test-parity/node-suite/stream/finished/error-false-option.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Readable, finished } from "node:stream";
// finished(stream, { error: false }, cb) — should NOT fire the callback
// when the stream emits an error (only on normal completion).
const r = new Readable({ read() {} });
r.on("error", () => {});
let fired = false;
let firedWith: any = null;
finished(r, { error: false } as any, (err: any) => {
fired = true;
firedWith = err;
});
r.destroy(new Error("kaboom"));
setImmediate(() => console.log("fired:", fired, "with:", firedWith));
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Readable } from "node:stream";
// Readable.from(promise) — when the promise rejects, the stream should
// emit an `error` event with the rejection reason.
const p = Promise.reject(new Error("boom"));
const r = Readable.from(p);
r.on("error", (e: any) => console.log("err:", (e && e.message) || String(e)));
r.on("data", () => {});
r.on("end", () => console.log("end"));