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

domenic approved this pull request.

LGTM with minor message suggestion.

> +      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()');

"and (but?) the cancel succeeds"? (same for other `return cancelPromise` tests

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

Received on Friday, 15 September 2017 05:56:48 UTC