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

domenic commented on this pull request.



> +      () => { throw new Error('closing should not succeed'); },
+      r => assert_equals(r.constructor.toString(), TypeError.toString(), 'closing should reject with the given reason')
+    ),
+    writer.abort().then(
+      () => { throw new Error('aborting a second time should not succeed'); },
+      r => assert_equals(r.constructor.toString(), TypeError.toString(), 'aborting a second time should reject ' +
+        'with the given reason')
+    ),
+    writer.closed.then(
+      () => { throw new Error('closed fulfilled unexpectedly'); },
+      r => assert_equals(r.constructor.toString(), TypeError.toString(), 'closed should reject with a TypeError')
+    )
+  ]);
+}, 'Aborting a WritableStream puts it in an errored state, with stored error equal to the abort reason');
+
+test(() => {

I meant promise_rejects, sorry.

-- 
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 13:57:51 UTC