Nuxt/vitest.config.ts
2023-01-20 16:23:16 +00:00

22 lines
621 B
TypeScript

import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import { configDefaults } from 'vitest/config'
import { isWindows } from 'std-env'
export default defineConfig({
resolve: {
alias: {
'#app': resolve('./packages/nuxt/src/app/index.ts'),
'@nuxt/test-utils': resolve('./packages/test-utils/src/index.ts')
}
},
esbuild: {
tsconfigRaw: '{}'
},
test: {
testTimeout: isWindows ? 60000 : 10000,
// Excluded plugin because it should throw an error when accidentally loaded via Nuxt
exclude: [...configDefaults.exclude, '**/this-should-not-load.spec.js']
}
})