mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
Test 1 in skills/index.test.tsx pays the full cold-start cost (jsdom env init + module transform + the @/hermes/@/store/profile import graph), which pushed past vitest's 5000ms default under load — caught at 8871ms on one run, 6.6s pure test time on another. Tests 2-4 are ~30-130ms each because all that setup is already cached, so only test 1 was at risk of timing out. Bump the describe-level timeout to 15s. Verified with 10 consecutive runs, 4 of which took 5.5-6.6s of test time and would have hard-failed under the old 5s default.
31 lines
857 B
TypeScript
31 lines
857 B
TypeScript
import type { TestProjectConfiguration } from 'vitest/config';
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
const reactUi: TestProjectConfiguration = {
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'ui',
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
include: ['src/**/*.test.{ts,tsx}'],
|
|
globals: true,
|
|
// The first test in each file pays jsdom env init + full module transform,
|
|
// which can exceed vitest's 5000ms default under CI/load. 15s gives the
|
|
// cold start headroom without masking genuinely hung tests.
|
|
testTimeout: 15_000
|
|
}
|
|
}
|
|
|
|
const electronNative: TestProjectConfiguration = {
|
|
test: {
|
|
name: 'electron',
|
|
environment: 'node',
|
|
include: ['electron/**/*.test.ts', 'scripts/**.test.{ts,mjs}']
|
|
}
|
|
}
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
projects: [reactUi, electronNative]
|
|
}
|
|
})
|