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

fix: adjust number of arguments in Response.json() #2225

Closed

Conversation

LiviaMedeiros
Copy link
Contributor

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

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

WPT fails because of this (the test was the reason for this change originally). Maybe the tests need to be updated.

Started \undici\test\wpt\tests\fetch\api\idlharness.any.js
{
  status: 1,
  name: 'Response interface: operation json(any, optional ResponseInit)',
  message: 'assert_equals: property has wrong .length expected 0 but got 1',
  stack: 'Error\n' +
    '    at get_stack (evalmachine.<anonymous>:4534:21)\n' +
    '    at new AssertionError (evalmachine.<anonymous>:4527:22)\n' +
    '    at assert (evalmachine.<anonymous>:4511:19)\n' +
    '    at assert_equals (evalmachine.<anonymous>:1516:9)\n' +
    '    at assert_wrapper (evalmachine.<anonymous>:1436:30)\n' +
    '    at IdlInterface.do_member_operation_asserts (evalmachine.<anonymous>:2363:5)\n' +
    '    at IdlInterface.<anonymous> (evalmachine.<anonymous>:2309:14)\n' +
    '    at Test.step (evalmachine.<anonymous>:2595:25)\n' +
    '    at IdlInterface.test_member_operation (evalmachine.<anonymous>:2257:12)\n' +
    '    at IdlInterface.test_members (evalmachine.<anonymous>:2720:26)'
}

@KhafraDev
Copy link
Member

KhafraDev commented Aug 25, 2023

yeah, it looks like the tests were updated at some point, https://wpt.fyi/results/fetch/api/idlharness.any.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&product=node.js&product=deno&aligned

I updated the WPTs and fixed this in my PR below, with credit

@KhafraDev KhafraDev mentioned this pull request Aug 25, 2023
@mcollina
Copy link
Member

Can this be closed?

@LiviaMedeiros
Copy link
Contributor Author

Yes. #2226 contains the fix and test/wpt/tests/fetch/api/idlharness.any.js does the length assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants