skills/with-testing/SKILL.md
Test strategy decisions. Use when: 'what to mock', 'test strategy', 'test coverage'.
npx skillsauth add kenoxa/spine with-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Map test boundaries before writing tests — classify each collaborator as real or stubbed, then let risk set depth.
Before writing tests, classify each collaborator of the unit under test:
| Collaborator | Category | Decision | |---|---|---| | HTTP / external API | External | Mock — network is variable, not intention | | Filesystem | External | Mock — side-effect producer | | Date / RNG | Nondeterministic | Mock — breaks reproducibility | | DOM side effects | External | Mock — environment dependency | | Database | External | Context-dependent — prefer test DB when available | | Internal module | Owned | Keep real — mocking what you own verifies nothing |
The heuristic: if a collaborator can fail the test for reasons unrelated to the code's intention, mock it.
For mock implementation rules and TDD workflow, use the tdd skill.
| Risk | Test expectations | |---|---| | Low | Unit coverage on changed logic; one failure case | | Medium | + integration tests at mock seams; perspective table recommended | | High | + security/failure-path scenarios; perspective table required |
Minimum: 90% branch coverage. Target: 100% for security, complex business logic, public APIs. Edge values: 0, min, max, +-1, empty, null.
>= 0, length >= 0)tools
Use when: 'create a worktree', 'git worktree', 'parallel branch'.
tools
Use when: 'session state', 'resume work', 'worktree session'.
development
Use when: 'goal prompt'.
testing
Thinking-lens stress-test on a recommendation.