1// META: global=window,worker 2'use strict'; 3 4promise_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'); 23