Skip to content

Commit 97a1679

Browse files
committed
Add vitest
1 parent 75de46a commit 97a1679

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

vitest.config.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { DevupUI } from '@devup-ui/vite-plugin'
2+
import { defineConfig } from 'vitest/config'
3+
4+
export default defineConfig({
5+
test: {
6+
coverage: {
7+
provider: 'v8',
8+
include: ['packages/*/src/**'],
9+
exclude: [
10+
'packages/*/src/types',
11+
'packages/*/src/**/__tests__',
12+
'**/*.stories.{ts,tsx}',
13+
],
14+
cleanOnRerun: true,
15+
reporter: ['text', 'json', 'html'],
16+
},
17+
projects: [
18+
{
19+
test: {
20+
name: 'node',
21+
include: ['packages/*/src/**/__tests__/**/*.test.{ts,tsx}'],
22+
exclude: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'],
23+
globals: true,
24+
environment: 'node',
25+
},
26+
},
27+
28+
{
29+
test: {
30+
name: 'happy-dom',
31+
include: ['packages/*/src/**/__tests__/**/*.browser.test.{ts,tsx}'],
32+
environment: 'happy-dom',
33+
globals: true,
34+
css: true,
35+
setupFiles: ['@testing-library/jest-dom/vitest'],
36+
},
37+
plugins: [
38+
DevupUI({
39+
debug: true,
40+
}),
41+
],
42+
},
43+
],
44+
cache: false,
45+
},
46+
})

0 commit comments

Comments
 (0)