Re: [whatwg/streams] Change 3 tests from async_test to promise_test (#537)

ricea commented on this pull request.



>      close() {
-      return new Promise(resolve => {
-        setTimeout(t.step_func(() => {
-          t.ok(readyFulfilledAlready, 'ready should have fulfilled already');
-          resolve();
-        }), 50);
-      });
+      return delay(50).then(() => asyncCloseFinished = true);

I reversed the logic so that I wouldn't need an assert inside the sink method. Simplifying the test was just a happy side-effect.

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

Received on Friday, 14 October 2016 07:31:18 UTC