Files
archy/neode-ui/vitest.config.ts
T
archipelagoandClaude Opus 5 60c1db98bb
Demo images / Build & push demo images (push) Failing after 40s
fix(ui-tests): raise the vitest timeout so a busy box cannot fail the gate
Four unrelated tests failed the release gate at once today — every one of
them "Test timed out in 5000ms", none an assertion. Wall times were 6.3s,
16.5s, 5.5s and 36.2s for tests that normally finish in milliseconds
(useModalKeyboard's takes 349ms on an idle box), and the whole suite took
405s against its usual ~70s. The cause was CPU starvation from a
concurrent cargo build, not anything in the code.

The 5s default says nothing about these tests and everything about the
machine: this box also runs a live node, so a gate run can always collide
with a build or container churn. 20s survives that while still bounding a
genuine hang.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 02:06:14 -04:00

47 lines
1.4 KiB
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
test: {
environment: 'jsdom',
globals: true,
// Vitest's 5s default is not a statement about these tests — the whole
// 1000-test suite runs in ~70s on an idle box. It is a statement about
// the machine. This one also runs a live node, so a release gate can
// collide with a cargo build or a container churn, and starved workers
// blow 5s on tests that normally take milliseconds: on 2026-08-20 four
// unrelated tests timed out at once (one after 36s of wall clock) purely
// from CPU contention, failing the gate with nothing actually broken.
// 20s keeps real hangs bounded while surviving a busy box.
testTimeout: 20_000,
hookTimeout: 20_000,
setupFiles: ['./vitest.setup.ts'],
root: '.',
passWithNoTests: true,
exclude: ['e2e/**', 'node_modules/**', '**/._*'],
coverage: {
provider: 'v8',
reporter: ['text', 'text-summary'],
include: [
'src/api/*.ts',
'src/stores/*.ts',
'src/composables/*.ts',
'src/utils/*.ts',
'src/services/*.ts',
'src/router/*.ts',
],
exclude: ['src/**/__tests__/**', 'src/**/*.d.ts', 'src/main.ts'],
thresholds: {
branches: 80,
},
},
}
})