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

lib,test: enable wasm/webapi/empty-body WPT #42960

Merged
merged 1 commit into from
May 5, 2022
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ function setupFetch() {
}

// Pass all data from the response body to the WebAssembly compiler.
for await (const chunk of response.body) {
streamState.push(chunk);
const { body } = response;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately, it would be nice to just have this entire function in another JS file and load it into pre_execution.js to keep the routine focusing on bootstrap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, will do that once this lands.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #42993.

if (body != null) {
for await (const chunk of body) {
streamState.push(chunk);
}
}
})().then(() => {
// No error occurred. Tell the implementation that the stream has ended.
Expand Down
3 changes: 0 additions & 3 deletions test/wpt/status/wasm/webapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"contenttype.any.js": {
"skip": "WPTRunner does not support fetch()"
},
"empty-body.any.js": {
"skip": "Bug in undici, see https://github.com/nodejs/undici/issues/1345"
},
"idlharness.any.js": {
"skip": "not configured"
},
Expand Down