Re: [whatwg/streams] TransformStream: test enqueue(), close(), error() in bad states (#793)

ricea commented on this pull request.



> +      assert_throws(new TypeError(), () => controller.error(), 'error() should throw');
+    }
+  });
+}, 'controller.error() throws the second time it is called');
+
+promise_test(() => {
+  let controller;
+  const ts = new TransformStream({
+    start(c) {
+      controller = c;
+    }
+  });
+  const cancelPromise = ts.readable.cancel();
+  assert_throws(new TypeError(), () => controller.error(), 'error() should throw');
+  return cancelPromise;
+}, 'controller.error() throws after readable.cancel()');

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/793#discussion_r139138416

Received on Friday, 15 September 2017 12:44:05 UTC