testing-unit
Unit testing patterns for isolated business logic tests — AAA pattern, parametrized tests (test.each, @pytest.mark.parametrize), fixture scoping (function/module/session), mocking with MSW/VCR at network level, and test data management with factories (FactoryBoy, faker-js). Use when writing unit tests, setting up mocks, structuring test data, optimizing test speed, choosing fixture scope, or reducing test boilerplate. Covers Vitest, Jest, pytest.
- License
- MIT
- Compatibility
- Claude Code 2.1.220+.
Pinned to revision 1ff988bd66da, so it is the text this page describes rather than whatever the author pushed since.
Pre-approved tools experimental
Experimental field. Support varies between clients, so this list is what the author declared, not what your client will enforce.
- Read
- Glob
- Grep
- WebFetch
- WebSearch
Files
- skills/testing-unit/SKILL.md
- skills/testing-unit/checklists/msw-setup-checklist.md
- skills/testing-unit/checklists/test-data-checklist.md
- skills/testing-unit/checklists/vcr-checklist.md
- skills/testing-unit/examples/handler-patterns.md
- skills/testing-unit/references/aaa-pattern.md
- skills/testing-unit/references/factory-patterns.md
- skills/testing-unit/references/msw-2x-api.md
- skills/testing-unit/references/stateful-testing.md
- skills/testing-unit/rules/_sections.md
- skills/testing-unit/rules/data-factories.md
- skills/testing-unit/rules/data-fixtures.md
- skills/testing-unit/rules/data-seeding-cleanup.md
- skills/testing-unit/rules/mocking-msw.md
- skills/testing-unit/rules/mocking-vcr.md
- skills/testing-unit/rules/unit-aaa-pattern.md
- skills/testing-unit/rules/unit-fixture-scoping.md
- skills/testing-unit/rules/unit-parametrized.md
- skills/testing-unit/scripts/create-msw-handler.md
- skills/testing-unit/scripts/create-test-case.md
- skills/testing-unit/scripts/create-test-fixture.md
- skills/testing-unit/test-cases.json
Every link opens the file at its source, pinned to the revision this page describes.