-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
26 lines (25 loc) · 788 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
26 lines (25 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* vitest.config.ts
* ----------------
*
* Vitest configuration for the Svelte wrapper. The Svelte Vite plugin
* compiles the `.svelte` component under test; `jsdom` provides the
* DOM. The actual `@arraypress/waveform-player` library is mocked at
* the module boundary (it relies on Web Audio + Canvas + Fetch which
* jsdom does not implement), so the tests verify the wrapper's own
* responsibilities without a real audio runtime.
*/
import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({
plugins: [svelte({ hot: false })],
test: {
include: ['test/**/*.test.ts'],
environment: 'jsdom',
globals: false,
setupFiles: ['./test/setup.ts'],
},
resolve: {
conditions: ['browser'],
},
});