-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathvitest.config.js
More file actions
46 lines (44 loc) · 1.56 KB
/
Copy pathvitest.config.js
File metadata and controls
46 lines (44 loc) · 1.56 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig, configDefaults } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import { quarantined } from './tests/quarantine.js';
const __dirname = resolve('.');
export default defineConfig({
plugins: [react()],
test: {
include: ['src/**/*.{test,spec}.{js,ts,jsx,tsx}', 'tests/**/*.{test,spec}.{js,ts,jsx,tsx}'],
// Files orphaned by the SvelteKit -> Next.js migration, plus a few needing
// live Supabase credentials. Listing them keeps `pnpm test` green and CI
// meaningful instead of permanently red. See tests/QUARANTINE.md — the goal
// is for this list to shrink to nothing.
exclude: [...configDefaults.exclude, ...quarantined],
environment: 'jsdom',
globals: true,
setupFiles: ['./tests/setup.js'],
coverage: {
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'src/test/',
'tests/setup.js',
'tests/mocks/',
'**/*.d.ts',
'**/*.config.{js,ts}',
'**/coverage/**',
],
include: ['src/**/*.{js,ts,jsx,tsx}', '!src/**/*.{test,spec}.{js,ts,jsx,tsx}'],
},
alias: {
'@': resolve(__dirname, './src'),
'svelte/store': resolve(__dirname, 'src/lib/shims/svelte-store.js'),
'svelte': resolve(__dirname, 'src/lib/shims/svelte-store.js'),
},
},
resolve: {
alias: {
'@': resolve(__dirname, './src'),
'svelte/store': resolve(__dirname, 'src/lib/shims/svelte-store.js'),
'svelte': resolve(__dirname, 'src/lib/shims/svelte-store.js'),
},
},
});