-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
40 lines (38 loc) · 834 Bytes
/
vitest.config.js
File metadata and controls
40 lines (38 loc) · 834 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
31
32
33
34
35
36
37
38
39
40
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
import path from 'path'
export default defineConfig({
resolve: {
alias: {
// During unit tests we don't need the real Clerk package; point imports
// to local lightweight mocks so Vitest / Vite can resolve them.
'@clerk/nextjs/server': path.resolve(
__dirname,
'./tests/unit/mocks/clerk.server.js'
),
'@clerk/nextjs': path.resolve(
__dirname,
'./tests/unit/mocks/clerk.client.js'
),
'@': path.resolve(__dirname, './src'),
},
},
test: {
coverage: {
reporter: [
'text',
'json-summary',
'json',
'clover',
'cobertura',
'html',
'html-spa',
'lcov',
],
provider: 'v8',
},
include: ['tests/unit/**/*.test.js'],
environment: 'jsdom',
},
plugins: [react()],
})