VernLLMVernLLM

Development

Scripts, test layout, and contribution guidelines for vern-llm

dev-scripts.sh
pnpm install
pnpm run build            # tsdown → dist (ESM + CJS + types)
pnpm run typecheck        # tsc --noEmit on src, since tsdown doesn't fully type-check
pnpm run typecheck:test   # tsc --noEmit on src + test (separate tsconfig, no rootDir conflict)
pnpm run test             # vitest run (unit + integration)
pnpm run test:unit        # vitest run --project unit
pnpm run test:int         # vitest run --project integration
pnpm run test:watch       # vitest, watch mode
pnpm run test:coverage    # vitest run --coverage (v8 provider)
pnpm run lint             # oxlint
pnpm run format           # oxfmt
pnpm run changeset        # record a change for the next release

Test layout

Tests live under tests/unit/ and tests/integration/. No real API calls are made anywhere in the suite; everything runs against fakes and mocks.

tests/unit/

FileCovers
vernLLM.call, vernLLM.schemaRetry, backoff, timeout, abort, schema, model override, usage
circuitBreakerBreaker as a standalone unit
cachedCallCaching, usage reservation/refund
loggerInjectable logger
vernLLM.historyMulti-turn history validation
vernLLM.utilsInternal helpers
index.exportsPublic export surface
adapters/*Each provider's request/response translation against a fake client

tests/integration/

FileCovers
vernLLM, vernLLM.history, cachedCallWorkflow-level behavior
adapters/*Workflow-level behavior per provider

Contributing

See Contributing for the full guide: forking, branch setup, test expectations, and the pre-PR checklist.

On this page