mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
vitest coverage (v8 provider) with per-file 100% thresholds for statements, branches, functions, and lines. Scope: our runtime source only — types-only files, vendor/ (upstream code), and examples/ (exercised by the demo smoke test) are excluded. yarn test:coverage runs the gate. 59 tests added to close every gap: llm generate-waterfall and adapter disposal; assembler edge protocol (duplicate block-start, stragglers after block-end, id fallback, usage omission, invariant violation); the whole Inbox surface incl. the wakeup-overwrite race; LoopAgent disposed-state throws and double-stop idempotence; config-driven agent creation; loop backstop catches (throwing turn-start/turn-end listeners, non-Error throws, non-JSON tool arguments); system-prompt dynamic sections and disposer paths; tools errorMessage fallbacks and the full schema-DSL emission matrix. Genuinely unreachable defensive guards carry /* v8 ignore */ comments with stated reasons rather than deletion (132 tests total).
29 lines
993 B
TypeScript
29 lines
993 B
TypeScript
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
plugins: [tsconfigPaths({ projects: ['./tsconfig.test.json'] })],
|
|
test: {
|
|
include: ['packages/*/tests/**/*.spec.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
// Coverage measures OUR runtime source. Types-only files carry no
|
|
// executable code; vendor/ and examples/ are out of scope (examples are
|
|
// exercised by the demo smoke test instead).
|
|
include: ['packages/*/src/**/*.ts'],
|
|
exclude: ['packages/*/src/types.ts'],
|
|
// 100% or it doesn't merge (AGENTS.md: excessive tests are welcome).
|
|
// Per-file so a well-covered big file can't subsidize a bare one.
|
|
// Every v8 ignore comment must carry a reason — see AGENTS.md.
|
|
thresholds: {
|
|
perFile: true,
|
|
statements: 100,
|
|
branches: 100,
|
|
functions: 100,
|
|
lines: 100,
|
|
},
|
|
reporter: ['text', 'html'],
|
|
},
|
|
},
|
|
})
|