- From: Adam Rice <notifications@github.com>
- Date: Thu, 24 Nov 2016 03:54:16 -0800
- To: whatwg/streams <streams@noreply.github.com>
Received on Thursday, 24 November 2016 11:54:48 UTC
ricea commented on this pull request.
> +
+promise_test(t => {
+ const ws = new WritableStream({
+ write() {
+ return Promise.reject(new Error());
+ }
+ });
+ const writer = ws.getWriter();
+ return writer.ready.then(() => {
+ const writePromise = writer.write('a');
+ writer.abort(new Error());
+ let closedResolved = false;
+ return Promise.all([
+ promise_rejects(t, new Error(), writePromise, 'write() should reject')
+ .then(() => assert_false(closedResolved, '.closed should not resolve before write()')),
+ promise_rejects(t, new TypeError(), writer.closed, '.closed should reject')
Okay, this is done. It should get simpler if we make write() and close() uninterruptable as discussed in #617.
--
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/619
Received on Thursday, 24 November 2016 11:54:48 UTC