Re: [whatwg/streams] Port writable stream abort tests to wpt (#540)

marvinhagemeister commented on this pull request.



> +  const writer = ws.getWriter();
+  writer.releaseLock();
+
+  const abortPromise = writer.abort();
+  return abortPromise.then(() => {
+    throw new Error('abortPromise fulfilled unexpectedly');
+  },
+  r => {
+    assert_equals(r.constructor.toString(), TypeError.toString(), 'abort() should reject with a TypeError');
+  });
+}, 'abort() on a released writer rejects');
+
+promise_test(() => {
+  const ws = new WritableStream({
+    write() {
+      throw new Error('Unexpected write() call');

Thanks for the tip. `recordingWritableStream` is much cleaner 👍 

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

Received on Wednesday, 19 October 2016 08:30:20 UTC