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

ricea 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'),

Nitpick:  the assertion description implies that it verifies more than it actually does. If we want to actually check that it's been reset, we have to save the previous value and verify it is not equal.

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

Received on Monday, 16 January 2017 12:00:26 UTC