diff --git a/lib/fetch/response.js b/lib/fetch/response.js index 018224bc02c..be97d67ce6f 100644 --- a/lib/fetch/response.js +++ b/lib/fetch/response.js @@ -48,7 +48,7 @@ class Response { } // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { + static json (data = undefined, init = {}) { if (arguments.length === 0) { throw new TypeError( 'Failed to execute \'json\' on \'Response\': 1 argument required, but 0 present.' diff --git a/test/wpt/status/fetch.status.json b/test/wpt/status/fetch.status.json index c432144f217..7c37163c35a 100644 --- a/test/wpt/status/fetch.status.json +++ b/test/wpt/status/fetch.status.json @@ -23,8 +23,7 @@ ] }, "idlharness.any.js": { - "fail": [ - "Response interface: operation json(any, optional ResponseInit)", + "flaky": [ "Window interface: operation fetch(RequestInfo, optional RequestInit)" ] },