Re: [whatwg/streams] Fix typo in Close/Enqueue checks for readable byte streams (#1051)

> The fact that all the tests passed with this typo indicates a lack of test coverage. Would you be up for fixing that too? (Not a requirement for merging.)

I think the same problems arise as in [the original PR](https://github.com/whatwg/streams/pull/1029#issuecomment-593285919). These changes are inside abstract operations that are not directly accessible through the API. The API will throw a `TypeError` when these checks fail, so it's not possible to reach the abstract op with a problematic state.

You'd need to find some other abstract operation which doesn't perform these checks on its own in advance. For `ReadableStreamDefaultController`, we could look at `ReadableStreamTee` or `TransformStreamDefaultControllerEnqueue`. However, for `ReadableByteStreamController`, the abstract ops are currently **only** used through the API, which always performs these checks. So I'm afraid there's currently no way to really test the changes from this PR. (Unless we would somehow export these abstract ops only for testing purposes, which would be weird...)

-- 
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/1051#issuecomment-653948468

Received on Sunday, 5 July 2020 22:47:51 UTC