From 6df23e2cceef14c47a1ed672db0c819f50dd6c0d Mon Sep 17 00:00:00 2001 From: higuaifan Date: Mon, 19 Feb 2024 14:14:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20[test]=20use=20happy-dom=20instead?= =?UTF-8?q?=20of=20jsdom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/package.json | 2 +- lib/vitest.config.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/package.json b/lib/package.json index 6c5a9c45..fe38998e 100644 --- a/lib/package.json +++ b/lib/package.json @@ -45,8 +45,8 @@ "@vitest/coverage-v8": "1.3.0", "@vue/test-utils": "^2.4.4", "dayjs": "^1.11.10", + "happy-dom": "^13.3.8", "interactjs": "^1.10.26", - "jsdom": "^24.0.0", "vitest": "^1.3.0", "vue": "^3.4.19" }, diff --git a/lib/vitest.config.ts b/lib/vitest.config.ts index 8a349751..1bccffc4 100644 --- a/lib/vitest.config.ts +++ b/lib/vitest.config.ts @@ -14,12 +14,12 @@ import Jsx from '@vitejs/plugin-vue-jsx'; export default defineConfig({ plugins: [Vue(), Jsx()], test: { - environment: 'jsdom', + environment: 'happy-dom', clearMocks: true, coverage: { provider: 'v8', all: true, include: ['components/**', 'compositions/**'], - } - } + }, + }, });