Re: [whatwg/streams] WPT-ify some tests (#597)

ricea commented on this pull request.



> +
+  return promise_rejects(t, error1, writer.close(), 'close should reject with the thrown error');
+}, 'close: throwing getter should cause writer close() to reject');
+
+promise_test(t => {
+  const ws = new WritableStream({
+    get write() {
+      throw error1;
+    }
+  });
+
+  const writer = ws.getWriter();
+
+  return promise_rejects(t, error1, writer.write('a'), 'write should reject with the thrown error')
+  .then(() => {
+    return promise_rejects(t, error1, writer.closed, 'closed should reject with the thrown error');

That's weird. I intended to write {} but it came out as ().

What I was trying to say is you could just do `() => promise_rejects(t, error1, writer.closed, 'closed should reject with the thrown error')`.

-- 
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/597

Received on Saturday, 5 November 2016 00:13:45 UTC