Debian Codegraph @

testing/web-platform/tests/streams/piping/transform-streams.any.js

raw
1 // META: global=window,worker,shadowrealm
2 'use strict';
3
4 promise_test(() => {
5 const rs = new ReadableStream({
6 start(c) {
7 c.enqueue('a');
8 c.enqueue('b');
9 c.enqueue('c');
10 c.close();
11 }
12 });
13
14 const ts = new TransformStream();
15
16 const ws = new WritableStream();
17
18 return rs.pipeThrough(ts).pipeTo(ws).then(() => {
19 const writer = ws.getWriter();
20 return writer.closed;
21 });
22 }, 'Piping through an identity transform stream should close the destination when the source closes');