response-static-json.any.html

FAILExpected10 of 16 subtests pass687 ms

Details

Test
/fetch/api/response/response-static-json.any.html
Harness
OK

Subtests

StatusSubtestMessage
FAILCheck response returned by static json() with init undefined
assert_equals: Response's statusText is "" expected "" but got "OK"
assert_equals: Response's statusText is "" expected "" but got "OK"
FAILCheck response returned by static json() with init {"status":400}
assert_equals: Response's statusText is "" expected "" but got "Bad Request"
assert_equals: Response's statusText is "" expected "" but got "Bad Request"
PASSCheck response returned by static json() with init {"statusText":"foo"}
FAILCheck response returned by static json() with init {"headers":{}}
assert_equals: Response's statusText is "" expected "" but got "OK"
assert_equals: Response's statusText is "" expected "" but got "OK"
FAILCheck response returned by static json() with init {"headers":{"content-type":"foo/bar"}}
assert_equals: Response's statusText is "" expected "" but got "OK"
assert_equals: Response's statusText is "" expected "" but got "OK"
FAILCheck response returned by static json() with init {"headers":{"x-foo":"bar"}}
assert_equals: Response's statusText is "" expected "" but got "OK"
assert_equals: Response's statusText is "" expected "" but got "OK"
PASSThrows TypeError when calling static json() with a status of 204
PASSThrows TypeError when calling static json() with a status of 205
PASSThrows TypeError when calling static json() with a status of 304
PASSCheck static json() encodes JSON objects correctly
FAILCheck static json() throws when data is not encodable
assert_throws_js: function "function () { Response.json(Symbol("foo")); }" did not throw
assert_throws_js: function "function () { Response.json(Symbol("foo")); }" did not throw
PASSCheck static json() throws when data is circular
PASSCheck static json() propagates JSON serializer errors
PASSCheck response returned by static json() with input 𝌆
PASSCheck response returned by static json() with input U+df06U+d834
PASSCheck response returned by static json() with input U+dead