v1rtl
v1rtl
DDeno
Created by v1rtl on 11/29/2023 in #help
"A fetch response body was created during the test" when invoking a PUT request in a test?
I made an ugly solution:
await res.body?.cancel()
const fetchResource = Object.keys(Deno.resources()).find((key) =>
Deno.resources()[parseInt(key)] === 'fetchResponse'
)
Deno.close(parseInt(fetchResource!))
await res.body?.cancel()
const fetchResource = Object.keys(Deno.resources()).find((key) =>
Deno.resources()[parseInt(key)] === 'fetchResponse'
)
Deno.close(parseInt(fetchResource!))
5 replies
DDeno
Created by v1rtl on 11/29/2023 in #help
"A fetch response body was created during the test" when invoking a PUT request in a test?
I tried changing the code to this:
const res = await uploadCar({ bucketName: 'filebase-upload-tests', token: Deno.env.get('FILEBASE_TOKEN')!, file })

assertEquals(res.headers.get('x-amz-meta-cid'), 'bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi')

await res.body?.cancel()
const res = await uploadCar({ bucketName: 'filebase-upload-tests', token: Deno.env.get('FILEBASE_TOKEN')!, file })

assertEquals(res.headers.get('x-amz-meta-cid'), 'bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi')

await res.body?.cancel()
It still errors the same way
5 replies
DDeno
Created by v1rtl on 11/29/2023 in #help
"A fetch response body was created during the test" when invoking a PUT request in a test?
What to do if I'm not returning a response?
5 replies
DDeno
Created by v1rtl on 3/26/2023 in #help
error: BadResource: Bad resource ID
well nothing else worked lol
10 replies
DDeno
Created by v1rtl on 3/26/2023 in #help
error: BadResource: Bad resource ID
I fixed with Deno.close(conn.rid + 1)... weird but it works
10 replies
DDeno
Created by v1rtl on 3/26/2023 in #help
error: BadResource: Bad resource ID
conn.close emits the same error as Deno.close(conn.rid)
10 replies
DDeno
Created by v1rtl on 3/26/2023 in #help
error: BadResource: Bad resource ID
what I'm trying to do is to close the server once a request has been done
10 replies
DDeno
Created by v1rtl on 1/28/2023 in #help
Republish a /x/ module from a deleted repo
ok thanks for help
3 replies