vite/vitest.config.e2e.ts

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

37 lines
903 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',
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) {
2023-09-21 09:01:16 +00:00
if (
log.match(
/experimental|jit engine|emitted file|tailwind|The CJS build of Vite/i,
)
)
2022-05-11 06:33:20 +00:00
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
},
publicDir: false,
2022-05-11 06:33:20 +00:00
})