Skip to content

test: strengthen tool tests and add linear_view coverage#5

Merged
jonryser merged 1 commit intomainfrom
feat/test-quality
Mar 12, 2026
Merged

test: strengthen tool tests and add linear_view coverage#5
jonryser merged 1 commit intomainfrom
feat/test-quality

Conversation

@genui-scotty
Copy link
Copy Markdown
Contributor

@genui-scotty genui-scotty bot commented Mar 12, 2026

What

Addressed the placeholder describe.todo() note — the test suite now has real, meaningful coverage.

Changes

New: test/tools/linear-view-tool.test.ts

  • linear_view was completely untested (0%). Now at 98% statement coverage.
  • Tests verify actual GraphQL variables, not just return values.
  • Covers null API response fallback and invalid filterData JSON.

Strengthened linear-issue-tool.test.ts:

  • create: verifies all 6 resolver calls with correct args, and that the composed mutation input object has the right keys/values
  • list: verifies actual query variables (state, team uppercased, assignee, project, default limit 50)
  • delete: verifies the resolved UUID is sent to the mutation
  • update: appendDescription both branches, dueDate null-clearing, team-scoped label resolution

Cleaned up all tool tests:

  • Removed trivial "has correct name" tests (string literals, zero bug-catching value)
  • Removed weak filter tests that only checked query.includes("keyword")

Coverage (src/tools)

Before After
Statements 76% 97%
Branch 59% 90%
Functions 94% 100%

374 tests passing.

@genui-scotty genui-scotty bot force-pushed the feat/test-quality branch from fe6c1af to f205296 Compare March 12, 2026 23:37
- Add test/tools/linear-view-tool.test.ts (was 0%, now 98% statements)
  Tests verify actual GraphQL variables, null fallback, invalid JSON
- Rewrite linear-issue-tool tests: verify mutation input composition
  and resolver call arguments, not just mocked return values
- list: verify query variables (state, team uppercased, assignee,
  project, default limit 50)
- create: verify all 6 resolver calls with correct args and that the
  composed mutation input has correct keys/values
- delete: verify resolved UUID sent to mutation
- update: appendDescription both branches, dueDate null-clearing,
  team-scoped label resolution
- Remove trivial 'has correct name' tests from all tool files

378 tests passing, src/tools at 97% statements / 90% branch coverage
@genui-scotty genui-scotty bot force-pushed the feat/test-quality branch from f205296 to 9efa493 Compare March 12, 2026 23:41
@jonryser jonryser merged commit 90d3152 into main Mar 12, 2026
1 check passed
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