0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-01 06:46:05 +02:00
gitea/vitest.config.ts
silverwind 9bb0aa1c49
Enable concurrent vitest execution (#36998)
Enable
[`sequence.concurrent`](https://vitest.dev/config/sequence.html#sequence-concurrent)
to run all js tests in parallel. This will help catch potential
concurrency bugs in the future. The "Repository Branch Settings" test
was not concurrency-safe, it was refactored to remove shared mutable
state.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>

---------

Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
2026-03-30 16:17:16 +00:00

26 lines
552 B
TypeScript

import {defineConfig} from 'vitest/config';
import vuePlugin from '@vitejs/plugin-vue';
import {stringPlugin} from 'vite-string-plugin';
export default defineConfig({
test: {
include: ['web_src/**/*.test.ts'],
setupFiles: ['web_src/js/vitest.setup.ts'],
environment: 'happy-dom',
testTimeout: 20000,
open: false,
allowOnly: true,
passWithNoTests: true,
globals: true,
watch: false,
isolate: false,
sequence: {
concurrent: true,
},
},
plugins: [
stringPlugin(),
vuePlugin(),
],
});