diff options
| author | Filip Wandzio <contact@philw.dev> | 2025-11-02 01:44:05 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2025-11-02 01:44:05 +0100 |
| commit | ba940047eb099fc18315d4cafd55300995a76894 (patch) | |
| tree | db4ae932ba798f0f15d3648d9950c05c6eae5b7e /vite.config.ts | |
| parent | d1fec5cf2df51c5260bbe877672a55d86de68b0d (diff) | |
| download | philw.dev-ba940047eb099fc18315d4cafd55300995a76894.tar.gz philw.dev-ba940047eb099fc18315d4cafd55300995a76894.zip | |
Implement unit testing with vitest
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'vite.config.ts')
| -rw-r--r-- | vite.config.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts index 0aa9f31..f173cc8 100644 --- a/vite.config.ts +++ b/vite.config.ts | |||
| @@ -3,4 +3,14 @@ import { svelte } from '@sveltejs/vite-plugin-svelte' | |||
| 3 | 3 | ||
| 4 | export default defineConfig({ | 4 | export default defineConfig({ |
| 5 | plugins: [svelte()], | 5 | plugins: [svelte()], |
| 6 | test: { | ||
| 7 | environment: 'jsdom', | ||
| 8 | globals: true, | ||
| 9 | setupFiles: './src/test/setupTests.ts' | ||
| 10 | }, | ||
| 11 | resolve: process.env.VITEST | ||
| 12 | ? { | ||
| 13 | conditions: ['browser'] | ||
| 14 | } | ||
| 15 | : undefined | ||
| 6 | }) | 16 | }) |
