Skip to content

test: full ModelInfo in the Compare attempts run-blocker fixture (tsc errors) - #20

Open
marceloceccon wants to merge 2 commits into
mainfrom
fix/compare-test-types
Open

marceloceccon wants to merge 2 commits into
mainfrom
fix/compare-test-types

Conversation

@marceloceccon

Copy link
Copy Markdown
Member

What changed

tests/compare-store-and-blocker.test.ts (added in #19) passed partial ModelInfo objects ({ id } only) in the run-blocker fixture. tsc --noEmit reported 8 type errors there. The fixture now uses a full ModelInfo. This is a type-only change: the assertions are unchanged.

Why

This was a defect in #19. CI doesn't type-check test files: vitest doesn't type-check, and next build only checks the app. So it wasn't caught. Noticed while verifying main against entropyvortex/ai-consensus-core#7.

How it was verified

tsc --noEmit -p tsconfig.json reports 0 errors (was 8), and pnpm lint, pnpm format:check and pnpm test (622/622) pass [executed].

What is left

  • CI: this PR's CI will stop at pnpm install --frozen-lockfile, like main does now. package.json needs ai-consensus-core@^0.13.0, which isn't published yet; after the release, refresh the lockfile on main.
  • Optional: add a typecheck script (tsc --noEmit) to CI so test files are type-checked.

…jects

tsc --noEmit reported 8 errors in tests/compare-store-and-blocker.test.ts
(participants and availableModels used partial ModelInfo). CI does not
type-check test files (vitest does not, and next build skips them), so
it slipped through #19. Type-only fix; assertions unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant