[streams] Factor out portions of a test suite that can be run against already-constructed streams (#264)

This is tricky, but important. The idea is that in the browser there will be various APIs that return an already-constructed stream. (E.g., `fetch`.) We would like to be able to test that these browser-constructed streams behave per spec. However, all of our current tests just create streams and then test them.

One way to do this would be to perhaps annotate the tests as having certain "prerequisite" streams passed in. For example:

- Empty readable stream
- Readable stream with 3 chunks
- Errored readable stream
- Readable stream with 1 chunk that becomes errored after 20 seconds

Then you could imagine that in the pure-JS test suite, we just manually create such streams, and then run the matching tests. But for the `fetch` tests, we use `fetch` + a local HTTP server with endpoints that respond in various ways to create the required stream.

Related a bit to #217.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/264

Received on Friday, 16 January 2015 20:02:40 UTC