Tests/LibWeb: Verify we throw when trying to pipe from/to locked streams

This commit is contained in:
Kenneth Myhra
2024-04-06 19:56:55 +02:00
committed by Andreas Kling
parent 8ff52582ce
commit a0802b6e29
Notes: sideshowbarker 2024-07-17 05:05:51 +09:00
4 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<script src="../include.js"></script>
<script>
asyncTest(done => {
const writableStream = new WritableStream(
{
write(chunk) {}
}
);
const stream = new ReadableStream({
start(controller) {},
pull(controller) {},
cancel() {},
});
stream.getReader();
stream.pipeTo(writableStream)
.catch(reason => {
println(reason);
done();
});
});
</script>