test: Improve unit test coverage#49
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Test plan
🤖 Generated with Claude Code