Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WPT that checks autoAllocateChunkSize cannot be 0 #26735

Merged
merged 1 commit into from Dec 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions streams/readable-byte-streams/general.any.js
Expand Up @@ -2055,6 +2055,11 @@ promise_test(() => {
return readPromise;
}, 'ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction');

test(() => {
assert_throws_js(TypeError, () => new ReadableStream({ autoAllocateChunkSize: 0, type: 'bytes' }),
'controller cannot be setup with autoAllocateChunkSize = 0');
}, 'ReadableStream with byte source: autoAllocateChunkSize cannot be 0');

test(() => {
const ReadableStreamBYOBReader = new ReadableStream({ type: 'bytes' }).getReader({ mode: 'byob' }).constructor;
const stream = new ReadableStream({ type: 'bytes' });
Expand Down