good-tests
/good-tests
Opisuje, czym jest dobry test: sprawdza zachowanie przez publiczne interfejsy, mockuje tylko granice systemu i wskazuje antywzorce.
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Opisuje, czym jest dobry test: sprawdza zachowanie przez publiczne interfejsy, mockuje tylko granice systemu i wskazuje antywzorce.
Oryginalny opis (EN)
What makes a test good: behaviour through public interfaces, mocks only at boundaries, the anti-patterns. Use whenever you write, change or mock a test, or rule on a change that adds or touches one.
Jak działa
- What a good test is
- Anti-patterns
Podgląd SKILL.md
--- name: good-tests description: "What makes a test good: behaviour through public interfaces, mocks only at boundaries, the anti-patterns. Use whenever you write, change or mock a test, or rule on a change that adds or touches one." --- # Good Tests ## What a good test is Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure. See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines. ## Anti-patterns - **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed. - **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec.
Pliki w paczce (3)
- SKILL.md 1 KB
- mocking.md 1 KB
- tests.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie good-tests.
Migawka bazy z 13.11.2026 · wersja paczki 73e4183e6215 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100tdd
Pisze testy test-first w małej liczbie i z sensem: uzgadnia punkty styku, buduje pionowe wycinki i mockuje tylko granice systemu. - 100test-quality
Określa, czym jest dobry test: behawioralny, skupiony i zdolny wychwycić regresję, przy pisaniu lub ocenie testów. - 100tdd
Rozwija zachowanie test-first przez uzgodnione interfejsy publiczne, z testem integracyjnym i zmianą implementacji. - 100writing-unit-tests
Pisze i recenzuje skupione, deterministyczne testy jednostkowe, które weryfikują zachowanie przez publiczne interfejsy, bez wiązania ze szczegółami implementacji. - 98tdd
Prowadzi rozwój sterowany testami w cyklu czerwony, zielony, refaktoryzacja, testując zachowanie przez publiczne interfejsy. - 90testing-code
Pisze testy na prośbę, na przykład dla funkcji lub test-first przy błędzie, i pomaga, gdy test jest niestabilny albo zestaw jest wolny.