-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathvitest.config.ts
More file actions
20 lines (19 loc) · 673 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
20 lines (19 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { defineConfig } from 'vitest/config'
import path from 'node:path'
export default defineConfig({
test: {
environment: 'node',
include: ['electron/**/*.test.ts', 'src/**/*.test.ts'],
globals: false,
testTimeout: 10000,
},
resolve: {
// Stub electron and electron-log/main so plain-Node unit tests don't try to
// boot the real Electron runtime.
alias: {
'electron-log/main': path.resolve(__dirname, 'electron/test/stubs/electron-log-main.ts'),
'electron-log': path.resolve(__dirname, 'electron/test/stubs/electron-log-main.ts'),
electron: path.resolve(__dirname, 'electron/test/stubs/electron.ts'),
},
},
})