- From: Adam Rice <notifications@github.com>
- Date: Wed, 09 Nov 2016 00:11:09 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/pull/603/review/7768727@github.com>
ricea commented on this pull request.
Since we haven't been running the 'Piping through a default transform stream causes backpressure to be exerted after some delay' test anyway, I don't think it's a great loss to delete it. We need backpressure tests, but this is not a good backpressure test. The timeouts create the impression that backpressure has something to do with timing, which is not the case at all.
> + }),
+
+ readable: new ReadableStream({
+ start(c) {
+ enqueueInReadable = c.enqueue.bind(c);
+ closeReadable = c.close.bind(c);
+ }
+ })
+ };
+}
+
+promise_test(() => {
+ const readableEnd = sequentialReadableStream(5).pipeThrough(duckTypedPassThroughTransform());
+
+ return readableStreamToArray(readableEnd).then(chunks =>
+ assert_array_equals(chunks, [1, 2, 3, 4, 5]));
assert needs a description. Something simple like 'chunks should match' would be fine.
> +
+ return readableStreamToArray(readableEnd).then(chunks =>
+ assert_array_equals(chunks, [1, 2, 3, 4, 5]));
+}, 'Piping through a duck-typed pass-through transform stream should work');
+
+promise_test(() => {
+ const rs = new ReadableStream({
+ start(c) {
+ c.enqueue('a');
+ c.enqueue('b');
+ c.enqueue('c');
+ c.close();
+ }
+ });
+
+ const ts = new TransformStream();
I don't think we need the `ts` variable. I think it would be clearer just to create the TransformStream object inline.
--
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/603#pullrequestreview-7768727
Received on Wednesday, 9 November 2016 08:11:41 UTC