mirror of
https://github.com/vitejs/vite.git
synced 2024-11-22 07:09:05 +00:00
31 lines
773 B
TypeScript
31 lines
773 B
TypeScript
import { resolve } from 'path'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
const timeout = process.env.CI ? 50000 : 30000
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'~utils': resolve(__dirname, './playground/test-utils')
|
|
}
|
|
},
|
|
test: {
|
|
include: ['./playground/**/*.spec.[tj]s'],
|
|
setupFiles: ['./playground/vitestSetup.ts'],
|
|
globalSetup: ['./playground/vitestGlobalSetup.ts'],
|
|
testTimeout: timeout,
|
|
hookTimeout: timeout,
|
|
globals: true,
|
|
reporters: 'dot',
|
|
onConsoleLog(log) {
|
|
if (log.match(/experimental|jit engine|emitted file|tailwind/i))
|
|
return false
|
|
},
|
|
maxThreads: process.env.CI ? 1 : undefined,
|
|
minThreads: process.env.CI ? 1 : undefined
|
|
},
|
|
esbuild: {
|
|
target: 'node14'
|
|
}
|
|
})
|