vite/vitest.config.e2e.ts

28 lines
663 B
TypeScript
Raw Permalink Normal View History

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'],
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'
}
})