Skip to content

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

Closed
LiviaMedeiros wants to merge 1 commit intonodejs:mainfrom
LiviaMedeiros:fix-response-json-length
Closed

fix: adjust number of arguments in Response.json()#2225
LiviaMedeiros wants to merge 1 commit intonodejs:mainfrom
LiviaMedeiros:fix-response-json-length

Conversation

@LiviaMedeiros
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
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
Copy Markdown
Member

KhafraDev commented Aug 25, 2023

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

Can this be closed?

@LiviaMedeiros
Copy link
Copy Markdown
Member 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.

4 participants