Re: [whatwg/streams] Test that TransformStream strategies are used correctly (#783)

ricea commented on this pull request.



> +                        'transform() should have been called 9 times');
+  });
+}, 'readableStrategy highWaterMark works');
+
+promise_test(t => {
+  let writableSizeCalled = false;
+  let readableSizeCalled = false;
+  const ts = new TransformStream(
+    {
+      transform(chunk, controller) {
+        t.step(() => {
+          assert_true(writableSizeCalled, 'writableStrategy.size() should have been called');
+          assert_false(readableSizeCalled, 'readableStrategy.size() should not have been called');
+          controller.enqueue(chunk);
+          assert_true(readableSizeCalled, 'readableStrategy.size() should have been called');
+        });

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/783#discussion_r136250232

Received on Thursday, 31 August 2017 05:49:42 UTC