Skip to content

Commit c61e5b1

Browse files
authored
test: remove tspl on 2283 test (#4301)
1 parent 2fcd8e0 commit c61e5b1

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

test/issue-2283.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
'use strict'
22

3-
const { tspl } = require('@matteo.collina/tspl')
43
const { describe, test } = require('node:test')
54
const { FormData, Response } = require('..')
65

76
describe('https://github.com/nodejs/undici/issues/2283', () => {
87
test('preserve full type when parsing multipart/form-data', async (t) => {
9-
t = tspl(t, { plan: 2 })
108
const testBlob = new Blob(['123'], { type: 'text/plain;charset=utf-8' })
119
const fd = new FormData()
1210
fd.set('x', testBlob)
1311
const res = new Response(fd)
14-
res.clone().text().then(body =>
15-
// Just making sure that it contains ;charset=utf-8
16-
t.ok(body.includes('text/plain;charset=utf-8'))
17-
)
1812

19-
new Response(fd).formData().then(fd => {
20-
// returns just 'text/plain'
21-
t.ok(fd.get('x').type === 'text/plain;charset=utf-8')
22-
})
13+
const body = await res.clone().text()
2314

24-
await t.completed
15+
// Just making sure that it contains ;charset=utf-8
16+
t.assert.ok(body.includes('text/plain;charset=utf-8'))
17+
18+
const formData = await new Response(fd).formData()
19+
20+
// returns just 'text/plain'
21+
t.assert.ok(formData.get('x').type === 'text/plain;charset=utf-8')
2522
})
2623
})

0 commit comments

Comments
 (0)