diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-11-28 21:54:15 -0500 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-11-28 21:54:15 -0500 |
| commit | 810ebb811c40b50ddb95bb9559d7515f46ec2052 (patch) | |
| tree | 993abbd49907b399af933a44fb40e2e88c6933a5 /vite.config.js | |
| parent | d23685c0ea46c92c75d43b6d6a361597241dd95e (diff) | |
| parent | 5ce6c9f6277c43caf7413cce255af7bdc947e74c (diff) | |
Merge branch 'main' into wip/stylize
Diffstat (limited to 'vite.config.js')
| -rw-r--r-- | vite.config.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vite.config.js b/vite.config.js index 863d652..e74647a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,8 +1,32 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; +import { configDefaults } from 'vitest/config' export default defineConfig({ plugins: [sveltekit()], + test: { + // If you are testing components client-side, you need to setup a DOM environment. + // If not all your files should have this environment, you can use a + // `// @vitest-environment jsdom` comment at the top of the test files instead. + environment: 'jsdom', + coverage: { + thresholds: { + statements: 49, + branches: 60, + functions: 14, + lines: 49 + }, + exclude: [ + ...configDefaults.exclude, + '**/*.config.js', + '**/docs/**', + '**/target/**' + ] + } + }, + // Tell Vitest to use the `browser` entry points in `package.json` files, + // even though it's running in Node + resolve: process.env.VITEST ? { conditions: ['browser'] } : undefined, server: { fs: { allow: [ |
