- From: Takeshi Yoshino <notifications@github.com>
- Date: Thu, 15 Oct 2015 02:25:07 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Thursday, 15 October 2015 09:25:38 UTC
> +}); > + > +var test11 = async_test('Underlying source: calling close twice on an empty stream should throw the second time'); > +test11.step(function() { > + new ReadableStream({ > + start: function(c) { > + c.close(); > + assert_throws(new TypeError(), c.close, 'second call to close should throw a TypeError'); > + } > + }).getReader().closed.then(test11.step_func(function() { test11.done('closed should fulfill'); })); > +}); > + > +var test12 = async_test('Underlying source: calling close twice on a non-empty stream should throw the second time'); > +test12.step(function() { > + var startCalled = false; > + var readCalled = false; I think we're sure that start() is invoked and c.close() is executed but we wanted to use the t.plan() to detect completion and it just had to count this in. We can skip readCalled checking, I think. No strong opinion, but we can. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/397/files#r42100597
Received on Thursday, 15 October 2015 09:25:38 UTC