Re: [whatwg/streams] Port remaining TransformStream tests to wpt (#762)

ricea commented on this pull request.



> +      t.step(() => assert_unreached('transform must never be called if start() fails'));
+    },
+    flush() {
+      t.step(() => assert_unreached('flush must never be called if start() fails'));
+    }
+  });
+
+  const writer = ts.writable.getWriter();
+  writer.write('a').then(t.step_func(() => {
+    assert_unreached('writer should be errored if start() fails');
+  }))
+  .catch(t.step_func(e => assert_equals(e, thrownError, 'writer rejects with same error')));
+  writer.close().then(t.step_func(() => {
+    assert_unreached('writer should be errored if start() fails');
+  }))
+  .catch(t.step_func(e => assert_equals(e, thrownError, 'writer rejects with same error')));

In the followup CL I am using Promise.all() to make sure all the results are actually checked, so I'd rather not fix this here.

-- 
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/762#discussion_r133331985

Received on Tuesday, 15 August 2017 23:53:50 UTC