From c8621a5e19ce8a022d6c80d67bb1dec68727565d Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Tue, 16 Apr 2024 11:11:56 -0400 Subject: [PATCH] Limit tests and coverage to Sveltekit directories --- vite.config.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index 7eab898a8..bbf28cef2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -37,16 +37,21 @@ export default defineConfig({ test: { setupFiles: ["./vitest-setup.js"], - include: ["src/**/*.{test,spec}.{js,ts}"], + include: [ + "src/lib/**/*.{test,spec}.{js,ts}", + "src/routes/**/*.{test,spec}.{js,ts}", + ], exclude: [ ...configDefaults.exclude, "storybook-static", + "node_modules", "./src/config/*", "../src/**/*.stories.@(js|jsx|ts|tsx|svelte)", ], environment: "jsdom", coverage: { - reporter: ["text", "html", "clover", "json"], + include: ["src/lib/**", "src/routes/**"], + reporter: ["text", "html", "lcov", "clover", "json", "json-summary"], }, }, });