Re: [whatwg/streams] Add TransformStream tests for re-entrant strategies (#795)

ricea commented on this pull request.



> +    writeResolved = true;
+  });
+  return flushAsyncEvents().then(() => {
+    assert_false(writeResolved);
+    controller.enqueue('a');
+    assert_equals(calls, 1, 'size() should have been called once');
+    return delay(0);
+  }).then(() => {
+    assert_true(writeResolved);
+    assert_equals(calls, 1, 'size() should only be called once');
+    return readPromise;
+  }).then(({ value, done }) => {
+    assert_false(done, 'done should be false');
+    // See https://github.com/whatwg/streams/issues/794 for why this chunk is not 'a'.
+    assert_equals(value, 'b', 'chunk should have been read');
+    return writePromise;

Done.

-- 
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/795#discussion_r139132607

Received on Friday, 15 September 2017 12:12:51 UTC