Skip to content

Commit

Permalink
for some reason this fixes the test
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Mar 14, 2024
1 parent 03a2d43 commit a07bbb9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/fetch/content-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const { createServer } = require('node:http')
const { once } = require('node:events')
const { Blob } = require('node:buffer')
const { fetch, FormData } = require('../..')
const { closeServerAsPromise } = require('../utils/node-http')

// https://github.com/nodejs/undici/issues/1783
test('Content-Length is set when using a FormData body with fetch', async (t) => {
Expand All @@ -18,7 +17,6 @@ test('Content-Length is set when using a FormData body with fetch', async (t) =>
}).listen(0)

await once(server, 'listening')
t.after(closeServerAsPromise(server))

const fd = new FormData()
fd.set('file', new Blob(['hello world 👋'], { type: 'text/plain' }), 'readme.md')
Expand All @@ -27,5 +25,5 @@ test('Content-Length is set when using a FormData body with fetch', async (t) =>
await fetch(`http://localhost:${server.address().port}`, {
method: 'POST',
body: fd
})
}).finally(() => server.close())
})

0 comments on commit a07bbb9

Please sign in to comment.