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

domenic approved 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')

Why not one Promise.all covering all three at once?

-- 
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#pullrequestreview-66560404

Received on Monday, 2 October 2017 19:12:27 UTC