
A solid reference for test architecture decisions. Covers the testing pyramid, AAA pattern, and when to reach for unit vs integration vs E2E tests. The mocking section is especially practical, breaking down stubs, spies, mocks, and fakes with clear guidance on what to mock and what to leave alone. Includes tables on test organization, data strategies, and common anti-patterns like testing implementation details instead of behavior. Works well when you're setting up a new test suite or trying to clean up an existing one that's become a maintenance burden. The emphasis on tests as documentation is the right mindset.
$ npx -y skills add vudovn/antigravity-kit --skill testing-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Principles for reliable test suites.
/\ E2E (Few)
/ \ Critical flows
/----\
/ \ Integration (Some)
/--------\ API, DB queries
/ \
/------------\ Unit (Many)
Functions, classes
| Step | Purpose |
|---|---|
| Arrange | Set up test data |
| Act | Execute code under test |
| Assert | Verify outcome |
| Type | Best For | Speed |
|---|---|---|
| Unit | Pure functions, logic | Fast (<100ms) |
| Integration | API, DB, services | Medium |
| E2E | Critical user flows | Slow |
| Principle | Meaning |
|---|---|
| Fast | < 100ms each |
| Isolated | No external deps |
| Repeatable | Same result always |
| Self-checking | No manual verification |
| Timely | Written with code |
Sponsors