2022-06-19 19:59:52 +00:00
|
|
|
import { resolve } from 'node:path'
|
2022-05-11 06:33:20 +00:00
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
|
2022-05-11 14:23:27 +00:00
|
|
|
const timeout = process.env.CI ? 50000 : 30000
|
|
|
|
|
2022-05-11 06:33:20 +00:00
|
|
|
export default defineConfig({
|
2022-05-11 09:03:19 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'~utils': resolve(__dirname, './playground/test-utils')
|
|
|
|
}
|
|
|
|
},
|
2022-05-11 06:33:20 +00:00
|
|
|
test: {
|
|
|
|
include: ['./playground/**/*.spec.[tj]s'],
|
2022-05-11 10:09:52 +00:00
|
|
|
setupFiles: ['./playground/vitestSetup.ts'],
|
|
|
|
globalSetup: ['./playground/vitestGlobalSetup.ts'],
|
2022-05-11 14:23:27 +00:00
|
|
|
testTimeout: timeout,
|
|
|
|
hookTimeout: timeout,
|
2022-05-11 06:33:20 +00:00
|
|
|
reporters: 'dot',
|
|
|
|
onConsoleLog(log) {
|
|
|
|
if (log.match(/experimental|jit engine|emitted file|tailwind/i))
|
|
|
|
return false
|
2022-05-17 14:33:44 +00:00
|
|
|
}
|
2022-05-11 06:33:20 +00:00
|
|
|
},
|
|
|
|
esbuild: {
|
|
|
|
target: 'node14'
|
|
|
|
}
|
|
|
|
})
|