forked from Libaizaima/boss-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
29 lines (27 loc) · 1.07 KB
/
Copy pathvitest.config.ts
File metadata and controls
29 lines (27 loc) · 1.07 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
import path from 'node:path'
import { defineConfig } from 'vitest/config'
// Minimal vitest config for the AI greeting send-verification bugfix.
// - jsdom env so Message.send() can run against fake window.GeekChatCore /
// ChatWebsocket / EventBus and the iframe-clean console used by `@/utils/logger`.
// - Path aliases mirror `.wxt/tsconfig.json` so source files compile unchanged.
// - No watch script; `"test": "vitest --run"` is the only npm script we add.
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
include: ['src/**/*.spec.ts', 'src/**/*.spec.tsx'],
// Bug Condition tests rely on fast-check shrinking, give them a roomy budget
// but still bounded so a Vitest run never hangs CI.
testTimeout: 30_000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@/': path.resolve(__dirname, './src') + '/',
'~': path.resolve(__dirname, './src'),
'~/': path.resolve(__dirname, './src') + '/',
'@@': path.resolve(__dirname, '.'),
'~~': path.resolve(__dirname, '.'),
},
},
})