From b29e21546aac0fbd96fb9608837d327df737c27c Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Mon, 29 Jan 2024 16:34:07 +0100 Subject: [PATCH] ci: enable coverage in vitest on CI (#33) --- package.json | 4 ++-- vitest.config.mts | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index dd5b9aa..ef2a408 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "build": "vue-tsc && vite build", "type-check": "vue-tsc --noEmit --composite false", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.mdx --fix --ignore-path .gitignore", - "format": "prettier --write .storybook src/ *.json *.cjs", - "format:check": "prettier --list-different .storybook src/ *.json *.cjs", + "format": "prettier --write .storybook src/ *.json *.cjs *.mts", + "format:check": "prettier --list-different .storybook src/ *.json *.cjs *.mts", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" }, diff --git a/vitest.config.mts b/vitest.config.mts index 7e75200..8595aca 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -16,17 +16,15 @@ export default mergeConfig( }, coverage: { provider: 'istanbul', - include: [ - 'src/lib/**/*.ts', - 'src/components/**/*.{vue,ts}', - ], - exclude: ["**/*.spec.ts", "**/*.stories.ts"] + reporter: ['text', 'json', 'html'], + include: ['src/lib/**/*.ts', 'src/components/**/*.{vue,ts}'], + exclude: ['**/*.spec.ts', '**/*.stories.ts'] }, environment: 'jsdom', exclude: [...configDefaults.exclude, 'e2e/*'], root: fileURLToPath(new URL('./', import.meta.url)), testTransformMode: { - web: ["**/*.{jsx,tsx}"] + web: ['**/*.{jsx,tsx}'] }, testTimeout: 10000 }