forked from ksmoore17/melt-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (29 loc) · 804 Bytes
/
Copy pathvite.config.ts
File metadata and controls
30 lines (29 loc) · 804 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
27
28
29
30
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { pagefind } from 'vite-plugin-pagefind';
export default defineConfig({
plugins: [
sveltekit(),
pagefind({ publicDir: 'static', buildDir: 'build', buildScript: 'deploy' }),
],
test: {
include: ['src/**/*.spec.{js,ts}'],
// jest like globals
globals: true,
environment: 'jsdom',
// in-source testing
includeSource: ['src/**/*.{js,ts,svelte}'],
// Add @testing-library/jest-dom matchers & mocks of SvelteKit modules
setupFiles: ['./scripts/setupTest.ts'],
// Exclude files in v8
coverage: {
exclude: ['setupTest.ts'],
},
alias: [{ find: /^svelte$/, replacement: 'svelte/internal' }],
deps: {
inline: ['clsx'],
},
retry: 5,
allowOnly: !process.env.CI,
},
});