Skip to content

test(skills): add unit tests for getAvailableSkills filtering#3324

Merged
AhmedTMM merged 4 commits intomainfrom
test/skills-filtering-coverage
Apr 19, 2026
Merged

test(skills): add unit tests for getAvailableSkills filtering#3324
AhmedTMM merged 4 commits intomainfrom
test/skills-filtering-coverage

Conversation

@la14-1
Copy link
Copy Markdown
Member

@la14-1 la14-1 commented Apr 18, 2026

Why: getAvailableSkills() has zero test coverage despite being the entry point for --beta skills flag filtering; a manifest schema change could silently break skill injection with no test signal.

Summary

  • Adds skills-filtering.test.ts with 9 tests covering getAvailableSkills() from shared/skills.ts
  • Tests: empty manifest, empty skills object, agent mismatch, correct agent filtering, isDefault flag, envVars collection, missing env_vars default, description passthrough, multi-agent cross-filtering

Test plan

  • bun test src/__tests__/skills-filtering.test.ts — 9 pass
  • bun test full suite — 2079 pass, 0 fail
  • biome check — clean

Agent: test-engineer

louisgv and others added 2 commits April 18, 2026 14:20
getAvailableSkills() had zero test coverage despite being the entry
point for --beta skills flag filtering. Covers: empty manifest, agent
mismatch, correct filtering, isDefault flag, envVars collection.

Agent: test-engineer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ars, installSkills

The Mock Tests CI check was failing because importing skills.ts in
tests caused bun to instrument it for coverage, but only getAvailableSkills
was tested (12.5% function coverage). Added tests for the remaining
exported functions to bring coverage above the 50% threshold.

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@AhmedTMM AhmedTMM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — CI green.

@AhmedTMM AhmedTMM merged commit 8640cf7 into main Apr 19, 2026
5 checks passed
@AhmedTMM AhmedTMM deleted the test/skills-filtering-coverage branch April 19, 2026 08:35
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.

3 participants