Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/vitest-testing
**AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.**
Passed 19 of 22 test cases with the skill, and 18 of 22 without it.
1 fixed18 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
A function `scheduleReminder` uses `setTimeout` to trigger a callback after 5 seconds. To test this function, a developer considers adding `await new Promise(r => setTimeout(r, 5000))` directly inside the unit test. Why is this problematic, and what mechanism should be used instead?
| Checked | Without skill | With skill |
|---|---|---|
| Advise using fake timers instead of real delays in unit tests. | Passed | Passed |
| Specify using vi.useFakeTimers to control timer advancement. | Missed | Passed |
The instructions your model reads when the skill loads.
AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.
For humans: Start with README.md for full navigation For AI agents: This file provides quick access to all skill resources
/principles/Foundation concepts that guide all testing decisions:
| File | Purpose | When to Use |
|---|---|---|
| first-principles.md | F.I.R.S.T quality attributes | Every test |
| aaa-pattern.md | Arrange-Act-Assert structure | Structuring tests |
| bdd-integration.md | Given/When/Then with AAA | Business-focused tests |
/strategies/Approaches for different testing scenarios:
| File | Purpose | When to Use |
|---|
test cases passed, vs 18 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.