18 lines
600 B
TypeScript
18 lines
600 B
TypeScript
import { configDefaults, defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
exclude: [
|
|
...configDefaults.exclude,
|
|
'.worktrees/**',
|
|
],
|
|
// Many of our web tests rely on React's test utilities (act, etc.).
|
|
// If NODE_ENV is accidentally set to "production" in the environment,
|
|
// React switches to the production build where act() is not supported.
|
|
// Force a safe default so local/CI runs are stable.
|
|
env: {
|
|
NODE_ENV: process.env.NODE_ENV && process.env.NODE_ENV !== 'production' ? process.env.NODE_ENV : 'test',
|
|
},
|
|
},
|
|
});
|