Skip to content

test: add vitest configuration with initial test suite#69

Open
rollroyces wants to merge 1 commit into
OpenBMB:mainfrom
rollroyces:feat/test-infrastructure
Open

test: add vitest configuration with initial test suite#69
rollroyces wants to merge 1 commit into
OpenBMB:mainfrom
rollroyces:feat/test-infrastructure

Conversation

@rollroyces
Copy link
Copy Markdown

Summary

Adds comprehensive test infrastructure to PilotDeck:

  • Vitest configuration with coverage reporting
  • Tests for core error model (normalizeModelError)
  • Tests for agent protocol errors and runtime helpers
  • Tests for tool call collection and result pairing
  • Tests for channel adapter interface and WebhookSessionMapper
  • TurnInputProcessor unit tests

New Test Files

File Tests
tests/model/errors/normalizeModelError.test.ts 17
tests/agent/protocol/errors.test.ts 10
tests/agent/loop/collectToolCalls.test.ts 4
tests/agent/loop/ensureToolResultPairing.test.ts 2
tests/agent/turn/TurnInputProcessor.test.ts 3
tests/adapters/channel/ChannelAdapter.test.ts 3
tests/adapters/channel/WebhookSessionMapper.test.ts 6

Changes

  • Updated vitest.config.js with globals, coverage, and test inclusion
  • Added test:vitest, test:watch, test:coverage scripts to package.json
  • Added vitest devDependency

Impact

Establishes the testing foundation for the entire project, enabling:

  • CI verification of all PRs via npm run test:vitest
  • Regression prevention through unit tests
  • Documentation of expected behavior via tests

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