From e487445de55aa0be3029f6f375952152a9dcd6a6 Mon Sep 17 00:00:00 2001 From: Guten Ye Date: Fri, 3 Jan 2025 10:45:00 +0800 Subject: [PATCH] test(fetch): improve test --- src/fetch/__tests__/fetchUtils.test.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/fetch/__tests__/fetchUtils.test.ts b/src/fetch/__tests__/fetchUtils.test.ts index 1a1e59c..c90523c 100644 --- a/src/fetch/__tests__/fetchUtils.test.ts +++ b/src/fetch/__tests__/fetchUtils.test.ts @@ -49,13 +49,6 @@ describe('createRequest', () => { it('path traversal attack', async () => { const api = createRequest(BASE_URL) - expect(await api('/../a')).toEqual([ - new URL(`${BASE_URL}/a`), - { - headers: { - 'Content-Type': 'application/json', - }, - }, - ]) + expect((await api('/../a'))[0]).toEqual(new URL(`${BASE_URL}/a`)) }) })