Streams: add tests for ReadableStreamBYOBReader.read(view, { min })#29723
Merged
domenic merged 25 commits intoweb-platform-tests:masterfrom Nov 13, 2023
Merged
Streams: add tests for ReadableStreamBYOBReader.read(view, { min })#29723domenic merged 25 commits intoweb-platform-tests:masterfrom
domenic merged 25 commits intoweb-platform-tests:masterfrom
Conversation
6 tasks
MattiasBuelens
commented
Jul 20, 2021
MattiasBuelens
commented
Aug 1, 2021
| assert_equals(pullCount, 2, 'pull() must only be called 2 times'); | ||
| assert_false(result3.done, 'branch2 second read() should not be done'); | ||
| assert_typed_array_equals(result3.value, new Uint8Array([0x02, 0x03]), 'branch2 second read() value'); | ||
| }, 'ReadableStream with byte source: tee() with readFully() from branch1 and read() from branch2'); |
Contributor
Author
There was a problem hiding this comment.
See comment on whatwg/streams#1145 for context.
domenic
reviewed
Aug 13, 2021
Member
domenic
left a comment
There was a problem hiding this comment.
All tests LGTM, be also need tests for the early-error cases, e.g. detached buffer, 0-length view/buffer, etc.
Maybe run the coverage tool and see what it spits out?
ricea
approved these changes
Aug 17, 2021
Contributor
ricea
left a comment
There was a problem hiding this comment.
Looks good. I can't see any obvious gaps. Just a few nits.
Contributor
Author
|
Added a couple more tests, coverage should be good now. 🙂 |
Contributor
|
Still lgtm. |
ce4e332 to
86ab381
Compare
060a1ab to
a684ebd
Compare
a684ebd to
3de5344
Compare
Contributor
|
Still lgtm. |
29f52ee to
e9fb817
Compare
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tests for the new optional
minparameter inReadableStreamBYOBReader.read(view, { min }).See whatwg/streams#1145 for the accompanying spec change.
To do:
0 < min <= view.length