Unit Testing Patterns

Write effective unit tests — Arrange-Act-Assert structure, test boundary selection, mocking strategy, test doubles (spy/stub/mock/fake), parameterized tests, snapshot pitfalls, test naming, and Vitest/Jest configuration. Use when asked about "unit test", "write tests", "Jest", "Vitest", "mock function", "spy on", "stub", "test coverage", "describe/it/expect", "beforeEach/afterEach", "parameterized test", "test.each", "snapshot test", "how to test this function", or "unit testing best practices". Do NOT use for: E2E browser testing — see e2e-testing. Do NOT use for: contract testing — see contract-testing. Do NOT use for: load testing — see load-testing.

yanacuti1121 fedd9e6 6.0 KB Updated 2 repo stars

File contents

yanacuti1121/Yana-AI/tree/main/core/skills/unit-testing-patterns commit fedd9e6415

Frequently asked questions

npx skillmds add yanacuti1121/unit-testing-patterns