forked from frosty720/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
41 lines (39 loc) · 1.04 KB
/
vitest.config.mts
File metadata and controls
41 lines (39 loc) · 1.04 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
import { defineConfig } from 'vitest/config'
import { resolve } from 'path'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'node',
include: ['**/__tests__/**/*.test.{ts,tsx}'],
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
// Focus on core math/calculation utilities - the critical business logic
// Async contract-calling functions are tested in integration tests
include: [
'src/utils/price.ts',
'src/utils/priceImpact.ts',
'src/utils/staking/mathHelpers.ts',
'src/utils/tokens.ts',
],
exclude: [
'**/__tests__/**',
],
thresholds: {
// Thresholds for testable pure functions
// priceImpact.ts has async contract calls that lower overall coverage
statements: 75,
branches: 85,
functions: 80,
lines: 75,
},
},
},
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
})