[whatwg/streams] Update reference implementation for Node v6 (#445)

Node v6 implements almost all of the ES6 features we were using; the only exception is modules. I will convert to CommonJS and then rip out all the build pipeline stuff.

A worse problem though is that some web platform tests have started failing on Node v6. Unsure yet whether they're a problem with the tests, with Node, or with the reference implementation. My guess is the tests are written flakily.

Results excerpt:

```
  √ ReadableStream start should be able to return a promise
  √ ReadableStream start should be able to return a promise and reject it
  √ ReadableStream should be able to enqueue different objects.
  √ ReadableStream: if pull rejects, it should error the stream
  × ReadableStream: should only call pull once upon starting the stream

    assert_equals: pull should be called once start finishes expected 1 but got 0
        at startPromise.then (http://127.0.0.1:60948/readable-streams/general.js:285:5)
  √ ReadableStream: should call pull when trying to read from a started, empty stream
  × ReadableStream: should only call pull once on a non-empty stream read from before start fulfills

    assert_equals: pull should be called once start finishes expected 1 but got 0
        at startPromise.then (http://127.0.0.1:60948/readable-streams/general.js:340:5)
  × ReadableStream: should only call pull once on a non-empty stream read from after start fulfills

    assert_equals: calling read() should cause pull to be called immediately expected 1 but got 0
        at startPromise.then (http://127.0.0.1:60948/readable-streams/general.js:371:5)
  × ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining

    assert_equals: pull should have been called once by the time the stream starts expected 1 but got 0
        at startPromise.then (http://127.0.0.1:60948/readable-streams/general.js:400:5)
  × ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining

    assert_equals: pull should have been called once by the time the stream starts expected 1 but got 0
        at startPromise.then (http://127.0.0.1:60948/readable-streams/general.js:434:5)
  √ ReadableStream: should not call pull until the previous pull call's promise fulfills
  × ReadableStream: should pull after start, and after every read

    assert_equals: pull() should be called exactly four times expected 4 but got 3
        at startPromise.then.then.then.then.then (http://127.0.0.1:60948/readable-streams/general.js:533:5)
  √ ReadableStream: should not call pull after start if the stream is now closed
  √ ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows
  √ ReadableStream pull should be able to close a stream.
  √ ReadableStream pull should be able to error a stream.
```

---
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/issues/445

Received on Wednesday, 27 April 2016 17:35:15 UTC