vite/vitest.config.e2e.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
824 B
TypeScript
Raw 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',
deps: {
// Prevent Vitest from running the workspace packages in Vite's SSR runtime
moduleDirectories: ['node_modules', 'packages'],
},
2022-05-11 06:33:20 +00:00
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: 'node18',
2022-05-11 06:33:20 +00:00
},
})