From 65fb0c389f6bcb634e7459d3fdbf6e014bfb59a4 Mon Sep 17 00:00:00 2001 From: hymbz Date: Wed, 26 Jun 2024 23:13:03 +0800 Subject: [PATCH] =?UTF-8?q?test:=20:white=5Fcheck=5Fmark:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=B5=8B=E8=AF=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Manga/handleComicData.test.ts | 2 ++ vitest.config.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 vitest.config.ts diff --git a/src/components/Manga/handleComicData.test.ts b/src/components/Manga/handleComicData.test.ts index 5ec306fe..c09f7d6e 100644 --- a/src/components/Manga/handleComicData.test.ts +++ b/src/components/Manga/handleComicData.test.ts @@ -1,3 +1,5 @@ +// @vitest-environment jsdom + import { beforeEach, expect, it } from 'vitest'; import { handleComicData, autoCloseFill } from './handleComicData'; diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..3e9dd460 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,12 @@ +import { resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { defineConfig } from 'vitest/config'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +export default defineConfig({ + test: { + alias: { helper: resolve(__dirname, './src/helper') }, + }, +});