Re: [whatwg/streams] TransformStream: Verify behaviour of abort() during write() (#817)

ricea commented on this pull request.



> @@ -308,4 +308,19 @@ promise_test(t => {
   });
 }, 'erroring during write with backpressure should result in the write failing');
 
+promise_test(t => {
+  const ts = new TransformStream({}, undefined, { highWaterMark: 0 });
+  return delay(0).then(() => {
+    const writer = ts.writable.getWriter();
+    // write should start synchronously
+    const writePromise = writer.write(0);
+    const abortPromise = writer.abort();
+    return promise_rejects(t, new TypeError(), ts.readable.getReader().read(), 'read() should reject')

I think I was trying to make it clearer why the read() was there. But it didn't work, because I couldn't remember why it was needed. I have added comments instead.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/817#discussion_r142355486

Received on Tuesday, 3 October 2017 09:40:51 UTC