diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-11-15 22:37:39 -0500 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-11-15 22:37:39 -0500 |
| commit | 8a7cc9f8859c14b60da870cee199110e71e0f5da (patch) | |
| tree | 31b692390dd1d8d60f7b5dfef5de79ef35908235 /vite.config.js | |
| parent | 845372868fa9bc90b5f57d423b736d7d0581037d (diff) | |
Ratchet up Component test coverage
Turns out a number of our components are a pain to run via a mounting
test, but Svelte does suggest that this is the dispreferred way to test
anyway. Using use:, triggering navigation after logout, and
scrollIntoView all make the headless node test process with the janky
in-memory mount have a Very Bad Day.
But this is still progress! We will press on.
Diffstat (limited to 'vite.config.js')
| -rw-r--r-- | vite.config.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vite.config.js b/vite.config.js index 8d6866d..50032d0 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,6 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; +import { configDefaults } from 'vitest/config' export default defineConfig({ plugins: [sveltekit()], @@ -7,7 +8,21 @@ export default defineConfig({ // 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' + environment: 'jsdom', + coverage: { + thresholds: { + statements: 31, + branches: 46, + functions: 8, + lines: 31 + }, + 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 |
