Skip to content

test: Improve unit test coverage#49

Merged
eyelock merged 4 commits into
mainfrom
test/improve-unit-tests
Jan 16, 2026
Merged

test: Improve unit test coverage#49
eyelock merged 4 commits into
mainfrom
test/improve-unit-tests

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 16, 2026

Summary

  • Improve overall test coverage from ~80.9% to significantly higher levels
  • Add comprehensive MCP server test suite with 2442 new lines of test code
  • Total: 465 tests passing

Changes

  • test(coverage): Improve test coverage from 80.9% to 86.4% - Initial coverage push
  • test(coverage): Additional coverage improvements (87.05%) - Further improvements
  • test(coverage): Push for maximum coverage on non-MCP files - Non-MCP coverage
  • test(mcp): Comprehensive MCP server test coverage - Full MCP test suite

Test plan

  • All 465 tests pass locally
  • CI passes

🤖 Generated with Claude Code

David Collie and others added 4 commits January 16, 2026 14:49
Add comprehensive tests for BoardLoader/BoardWriter (38 tests),
enhance Board tests (+16 tests), and Card/OutputTypes tests (+31 tests).

Key coverage improvements:
- BoardLoader.swift: 71.54% → 97.31%
- Board.swift: 76.47% → 97.48%
- Card.swift: 77.92% → 100%

Total tests: 239 → 324

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tests for JSONHelper print functions (OutputTypes: 82% → 99%)
- Add tests for Board.sortedColumns and findTerminal paths (100%)
- Add tests for Column decoding without description (100%)
- Fix linting warning in OutputTypes.swift

Total tests: 334 → 338

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DecodingError tests for BoardLoader.loadBoard
- Add column ID validation edge case tests
- Add TerminalCard encode tests for optional Date fields
- Add comprehensive full-property round-trip test

Coverage status (non-MCP files):
- 7 files at 100%: Column, Tag, Card, Board(Shared), Errors
- BoardLoader: 97.69%
- Board(Core): 97.48%
- OutputTypes: 98.63%
- TerminalCard: 95.08%

Remaining uncovered lines are defensive fallbacks that cannot be
reached in practice (e.g., nil coalescing for non-nullable values).

Total tests: 338 → 349

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add extensive tests for MCPServerLib achieving near-complete coverage:

- ServerTests: Server initialization, loadBoard, tool dispatch, available
  resources/prompts/tools, context documentation (25+ tests)
- InputValidatorTests: Path validation edge cases, all describeType cases,
  nil argument handling (20+ new tests)
- SchemaBuilderTests: PropertyType, Property initialization, convenience
  methods, objectSchema variants (25+ tests)
- ToolHandlersTests: All 9 tool handlers with success/failure/edge cases
  (39 tests)
- PromptHandlersTests: session_start, workflow_guide, terminal_summary
  prompts (16+ tests)
- ResourceHandlersTests: terminals, columns, pending, context resources
  (15+ tests)

Total: 2442 new lines of test code, 465 tests passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@eyelock eyelock merged commit a1358fe into main Jan 16, 2026
5 checks passed
@eyelock eyelock deleted the test/improve-unit-tests branch January 16, 2026 17:27
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