mirror of https://github.com/buster-so/buster.git
25 lines
673 B
TypeScript
25 lines
673 B
TypeScript
import { loadEnv } from 'vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export const baseConfig = defineConfig(async () => {
|
|
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');
|
|
|
|
return {
|
|
plugins: [tsconfigPaths()],
|
|
test: {
|
|
include: ['**/*.test.ts', '**/*.spec.ts'],
|
|
exclude: ['**/node_modules/**', '**/dist/**', '**/build/**'],
|
|
globals: true,
|
|
testTimeout: 1000 * 60 * 2, // 2 minutes
|
|
env: loadEnv('', process.cwd(), ''),
|
|
pool: 'forks',
|
|
poolOptions: {
|
|
forks: {
|
|
maxForks: process.env.CI ? 1 : 8,
|
|
minForks: process.env.CI ? 1 : 8,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|