2026-06-09 20:02:15 +02:00
|
|
|
import { resolve } from 'node:path';
|
|
|
|
|
import { defineConfig, configDefaults } from 'vitest/config';
|
2026-08-18 19:55:23 +02:00
|
|
|
import { NON_CI_TEST_GLOBS } from './test-suites';
|
2026-06-09 20:02:15 +02:00
|
|
|
|
|
|
|
|
const root = resolve(import.meta.dirname, '..');
|
|
|
|
|
|
|
|
|
|
/**
|
2026-08-18 19:55:23 +02:00
|
|
|
* The default gate — what `npm test` and CI both run.
|
|
|
|
|
*
|
|
|
|
|
* Same as vitest.config.ts but EXCLUDES the suites that cannot pass on an
|
|
|
|
|
* arbitrary machine: browser-driven (Playwright + chromium), visual-regression
|
|
|
|
|
* (per-machine PNG baselines) and wall-clock perf. Those are not unmaintained;
|
|
|
|
|
* they have their own runners (`test:browser`, `test:mobile`, `test:perf`).
|
|
|
|
|
* See config/test-suites.ts for the list and the reason behind each entry.
|
2026-06-09 20:02:15 +02:00
|
|
|
*
|
|
|
|
|
* Keep the rest in sync with config/vitest.config.ts.
|
|
|
|
|
*/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
test: {
|
|
|
|
|
root,
|
|
|
|
|
globals: true,
|
|
|
|
|
environment: 'node',
|
|
|
|
|
include: ['test/**/*.test.ts'],
|
2026-08-18 19:55:23 +02:00
|
|
|
exclude: [...configDefaults.exclude, ...NON_CI_TEST_GLOBS],
|
2026-06-09 20:02:15 +02:00
|
|
|
setupFiles: ['./test/setup.ts'],
|
|
|
|
|
fileParallelism: false,
|
|
|
|
|
testTimeout: 30000,
|
|
|
|
|
teardownTimeout: 60000,
|
|
|
|
|
},
|
|
|
|
|
});
|