summaryrefslogtreecommitdiff
path: root/vite.config.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-02-24 11:41:24 -0500
committerOwen Jacobson <owen@grimoire.ca>2025-02-24 11:41:24 -0500
commit099471c574f6dceeb45f8bb5dae1699a734cb084 (patch)
tree945f44c9a90bf51de20c61a5a8c5ed82c2c05009 /vite.config.js
parent36cadfe00cacc6a6523f9862d3f7a08a9d0ce611 (diff)
parentfc0f1654a56d2247728a766f43e72ff169704888 (diff)
Merge branch 'prop/global-state-at-top-level'
Diffstat (limited to 'vite.config.js')
-rw-r--r--vite.config.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vite.config.js b/vite.config.js
index e74647a..4bd448f 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,14 +1,16 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { configDefaults } from 'vitest/config'
+import { svelteTesting } from '@testing-library/svelte/vite'
export default defineConfig({
- plugins: [sveltekit()],
+ plugins: [sveltekit(), svelteTesting()],
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',
+ restoreMocks: true,
coverage: {
thresholds: {
statements: 49,
@@ -26,7 +28,7 @@ export default defineConfig({
},
// 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,
+ resolve: process.env.VITEST ? { conditions: ['browser'] } : undefined,
server: {
fs: {
allow: [