From dd5cc156cea9f1cd7694440042fbcf68c71a3c13 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 26 Jun 2025 23:20:28 +0200 Subject: [PATCH] test: remove tspl on 2283 test --- test/issue-2283.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/test/issue-2283.js b/test/issue-2283.js index f2c55145cc7..b22b7b23755 100644 --- a/test/issue-2283.js +++ b/test/issue-2283.js @@ -1,26 +1,23 @@ 'use strict' -const { tspl } = require('@matteo.collina/tspl') const { describe, test } = require('node:test') const { FormData, Response } = require('..') describe('https://github.com/nodejs/undici/issues/2283', () => { test('preserve full type when parsing multipart/form-data', async (t) => { - t = tspl(t, { plan: 2 }) const testBlob = new Blob(['123'], { type: 'text/plain;charset=utf-8' }) const fd = new FormData() fd.set('x', testBlob) const res = new Response(fd) - res.clone().text().then(body => - // Just making sure that it contains ;charset=utf-8 - t.ok(body.includes('text/plain;charset=utf-8')) - ) - new Response(fd).formData().then(fd => { - // returns just 'text/plain' - t.ok(fd.get('x').type === 'text/plain;charset=utf-8') - }) + const body = await res.clone().text() - await t.completed + // Just making sure that it contains ;charset=utf-8 + t.assert.ok(body.includes('text/plain;charset=utf-8')) + + const formData = await new Response(fd).formData() + + // returns just 'text/plain' + t.assert.ok(formData.get('x').type === 'text/plain;charset=utf-8') }) })