21 lines
489 B
TypeScript
21 lines
489 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import { loadEnv } from 'vite'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode ?? 'test', process.cwd(), '')
|
|
return {
|
|
test: {
|
|
environment: 'node',
|
|
include: ['tests/integration/**/*.test.ts'],
|
|
testTimeout: 30000,
|
|
typecheck: { tsconfig: './tests/tsconfig.json' },
|
|
env,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'~': new URL('./app', import.meta.url).pathname,
|
|
},
|
|
},
|
|
}
|
|
})
|