From bc77b6bb8932903744596d5b22c5e1e746573d81 Mon Sep 17 00:00:00 2001 From: Nimo Beeren Date: Tue, 24 Dec 2024 18:59:37 +0100 Subject: [PATCH] remove duplicate test file --- packages/client-fetch/test/utils.test.ts | 66 ------------------------ 1 file changed, 66 deletions(-) delete mode 100644 packages/client-fetch/test/utils.test.ts diff --git a/packages/client-fetch/test/utils.test.ts b/packages/client-fetch/test/utils.test.ts deleted file mode 100644 index b204572be..000000000 --- a/packages/client-fetch/test/utils.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import { getParseAs } from '../src/utils'; - -describe('getParseAs', () => { - const scenarios: Array<{ - content: Parameters[0]; - parseAs: ReturnType; - }> = [ - { - content: null, - parseAs: undefined, - }, - { - content: 'application/json', - parseAs: 'json', - }, - { - content: 'application/ld+json', - parseAs: 'json', - }, - { - content: 'application/ld+json;charset=utf-8', - parseAs: 'json', - }, - { - content: 'application/ld+json; charset=utf-8', - parseAs: 'json', - }, - { - content: 'multipart/form-data', - parseAs: 'formData', - }, - { - content: 'application/*', - parseAs: 'blob', - }, - { - content: 'audio/*', - parseAs: 'blob', - }, - { - content: 'image/*', - parseAs: 'blob', - }, - { - content: 'video/*', - parseAs: 'blob', - }, - { - content: 'text/*', - parseAs: 'text', - }, - { - content: 'unsupported', - parseAs: undefined, - }, - ]; - - it.each(scenarios)( - 'detects $content as $parseAs', - async ({ content, parseAs }) => { - expect(getParseAs(content)).toEqual(parseAs); - }, - ); -});