Re: [whatwg/streams] WritableStream abort logic clean up (#655)

tyoshino commented on this pull request.



> +
+    return flushAsyncEvents();
+  }).then(() => {
+    const writePromise3 = writer.write('a');
+
+    return Promise.all([
+      promise_rejects(t, new TypeError(), writePromise3, 'writePromise3 must be rejected'),
+      promise_rejects(t, new TypeError(), writer.ready, 'writer.ready must be rejected after write completion'),
+      promise_rejects(t, error2, writer.closed, 'writer.closed must be rejected after write completion'),
+      promise_rejects(t, error2, abortPromise, 'abortPromise must be rejected after write completion')
+    ]);
+  }).then(() => {
+    writer.releaseLock();
+
+    return Promise.all([
+      promise_rejects(t, new TypeError(), writer.ready, 'writer.ready must be reset to be rejected with a TypeError'),

Ah, good point. Resetting is internal thing. What we should verify is that the promises are rejected with an error which indicates "already released". Fixed.

-- 
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/655

Received on Tuesday, 17 January 2017 05:12:10 UTC