Install any skill in seconds. Free to start, no credit card required.
Get Started Free →**AI-friendly comprehensive testing guidance for Vitest with practical patterns and behavior-driven development.**
82% 86%+5 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 18 of 22 without it.
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?
Specify using vi.useFakeTimers to control timer advancement.
3 of 3 safety checks passed
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 |
|---|
Next to this one in the catalogue, plus popular skills in the same category.