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