Re: [streams] Port a bunch of tests to web-platform-tests format (#397)

> +});
> +
> +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;

After looking at some test below, I noticed that you've introduced this check not to keep t.plan()'s expectation but really to ensure that we verify the start method is invoked. So, never mind.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/397/files#r42114347

Received on Thursday, 15 October 2015 11:51:35 UTC