unit-test-writer
/unit-test-writer
Pisze skupione testy jednostkowe w istniejącym frameworku projektu, z jednym zachowaniem w teście i przypadkami błędów.
- Autor
- RobinBeraud ↗
- Repozytorium
- claude-qa-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 10.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 10.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
Pisze skupione testy jednostkowe w istniejącym frameworku projektu, z jednym zachowaniem w teście i przypadkami błędów.
Oryginalny opis (EN)
Write focused unit tests for a function, class or module: one behaviour per test, Arrange-Act-Assert, descriptive names, boundary and error cases, no I/O, fast and deterministic; in the project's existing framework (pytest, JUnit 5, xUnit/NUnit, Jest/Vitest, PHPUnit, Go testing). Use when asked to add unit tests, cover a bug fix, or raise confidence in a module.
Jak działa
- Before writing
- Rules for each test
- Steps
- Output
Podgląd SKILL.md
--- name: unit-test-writer description: "Write focused unit tests for a function, class or module: one behaviour per test, Arrange-Act-Assert, descriptive names, boundary and error cases, no I/O, fast and deterministic; in the project's existing framework (pytest, JUnit 5, xUnit/NUnit, Jest/Vitest, PHPUnit, Go testing). Use when asked to add unit tests, cover a bug fix, or raise confidence in a module." --- # Unit test writer ## Before writing 1. Read the code **and** the existing tests: framework, folder layout, naming style, fixtures, helpers. Follow them. 2. List the behaviours of the unit (not its lines): normal results, boundaries, invalid input, errors from collaborators, state changes. ## Rules for each test - **One behaviour**, named after it: `test_late_fee_is_zero_on_due_date`, `Should_reject_negative_amount`. - **Arrange / Act / Assert** separated by a blank line; a single Act. - **Concrete expected values** computed independently of the code (by hand or from the spec), never by calling the code under test. - **No I/O**: no network, database, file system or real clock; inject or fake them. - **Deterministic**: fixed seeds, frozen time, no order dependence. - Assert on **outputs and observable state**, not on private methods or internal calls (unless the call *is* the behaviour, e.g. "an e-mail is sent"). - Cover: happy path, each boundary, each error path, null/empty, and the bug being fixed (regression test first, red, then fix). ## Steps 1. Write the tests, run them, show the output. 2. If a test passes before the code exists or after deliberately breaking the code, it is not testing anything: fix it. 3. Report what is covered and what deliberately is not. ## Output Test file(s), the run output, and a short behaviour checklist with ✔ per test.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · RobinBeraud/claude-qa-skills | 100 | MIT |
| matteocervelli/llms | 95 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki b86fc22633af (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
- 86unit-test
Pisze izolowane testy jednostkowe dla wskazanego pliku w schemacie Arrange-Act-Assert. - 100unit-test-author
Pisze testy jednostkowe z przypadkami brzegowymi, tabelarycznymi, mockami i stubami oraz sensownym pokryciem w pytest, Jest, Vitest, Go testing, JUnit, RSpec, xUnit i Rust. - 90write-tests
Pisze testy jednostkowe i integracyjne dla funkcji, modułu, endpointu lub poprawki błędu w istniejącym frameworku testowym. - 95unit-testing
Pomaga pisać, poprawiać i debugować testy jednostkowe izolowanych funkcji, metod i klas w Vitest, Jest, xUnit, NUnit, pytest, JUnit 5 i Go, z mockowaniem, test doubles i wzorcem AAA. - 100test-generator
Pisze testy jednostkowe i integracyjne dla istniejącego kodu: ścieżki poprawne, błędy i wartości graniczne, w stylu projektu. - 100unit-test-engineer
Pisze szybkie, deterministyczne testy jednostkowe, które sprawdzają zachowanie, przypadki brzegowe i błędne dane.