-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fetch: add tests for Response.json #32825
Fetch: add tests for Response.json #32825
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look great.
(Optional nit: for INIT_TESTS it might be clearer if you prefix the expectation variables in the for loop with "expected", e.g., "expectedStatus".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a test for a circular structure like
let a = {};
a.a = a;
@ricea Added. |
I'd like to land these tests so I can ship this feature in Deno in our canary branch. Any objections? Should I mark them "tenative" until the spec PR lands? |
Yes, fine to land as "tentative" if you're willing to rename them later. |
33c3c7f
to
1a8281d
Compare
A method that can be used to create well-formed JSON responses with very little effort. The JSON response is not pretty printed. Tests: web-platform-tests/wpt#32825. Closes #1389.
This commit adds support for the `Response.json` static method as specified in whatwg/fetch#1392. All WPTs from web-platform-tests/wpt#32825 pass. Bug: 1305358 Change-Id: Iaafdd514ed12644b6433c02e7d076ce43f51b9ef Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/ /3639064 Reviewed-by: Yutaka Hirano <[email protected]> Reviewed-by: Adam Rice <[email protected]> Commit-Queue: Yutaka Hirano <[email protected]> Cr-Commit-Position: refs/heads/main@{#1019479}
This commit adds support for the `Response.json` static method as specified in whatwg/fetch#1392. All WPTs from web-platform-tests/wpt#32825 pass. Bug: 1305358 Change-Id: Iaafdd514ed12644b6433c02e7d076ce43f51b9ef Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/ /3639064 Reviewed-by: Yutaka Hirano <[email protected]> Reviewed-by: Adam Rice <[email protected]> Commit-Queue: Yutaka Hirano <[email protected]> Cr-Commit-Position: refs/heads/main@{#1019479} NOKEYCHECK=True GitOrigin-RevId: e680cd1bf0f99e44102f8714dcb5f77fba82c5ed
Spec change: whatwg/fetch#1392