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: wpt tests that are failing #1666
Comments
|
This case also fails: const request = new Request('https://example.com', { method: 'POST', body: 'body' })
const originalBody = request.body
assert(request.bodyUsed === false)
const otherRequest = new Request(request, { body: 'another body' })
assert(request.bodyUsed === true) // <--- this assert fails
assert(request.body === originalBody)
assert(originalBody !== undefined)
assert(originalBody !== null)
assert(otherRequest.body !== originalBody) |
This comment has been hidden.
This comment has been hidden.
const initialBuffer = new Int8Array(new ArrayBuffer(16))
const stream = new ReadableStream({
start (controller) {
controller.enqueue(initialBuffer)
controller.close()
}
})
const [out1, out2] = stream.tee()
const { value } = await out2.getReader().read()
console.log(value === initialBuffer) // this should be falseThe same subset of tests are failing here (https://staging.wpt.fyi/results/fetch/api/response/response-clone.any.html?label=master&label=experimental&aligned&view=subtest) The spec makes no mention of cloning the value returned by |
This comment has been hidden.
This comment has been hidden.
|
Another test fails due to fetch allowing binding of Expected outcomes: The problem is that depending on how undici is imported, the default
We can't bind the value of Imports expected to work:
|
|
Should we create fetch as a closure instead? |
|
I will experiment with it, but none of my initial attempts got anywhere |
We check if signal is aborted here:
undici/lib/fetch/index.js
Line 126 in 9c3f34c
and the promise gets rejected here:
undici/lib/fetch/index.js
Line 304 in 9c3f34c
Originally posted by @KhafraDev in #1664 (comment)
The text was updated successfully, but these errors were encountered: