mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-01 06:46:05 +02:00
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>
26 lines
552 B
TypeScript
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(),
|
|
],
|
|
});
|