conventions-testing
/conventions-testing
Podpowiada domyślne zasady pisania testów: gdzie leżą, na jakim poziomie testować, jak je nazywać i mockować.
- Autor
- bitIO ↗
- Repozytorium
- wheelhouse ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.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 12.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
Podpowiada domyślne zasady pisania testów: gdzie leżą, na jakim poziomie testować, jak je nazywać i mockować.
Oryginalny opis (EN)
Default conventions for writing tests — where tests live, which level to test at, structure, naming, mocking boundaries, determinism and coverage. Use when writing or changing tests. For judging whether tests prove a change, use check-testing.
Jak działa
- Where and what
- How
- Frontend
Podgląd SKILL.md
--- name: conventions-testing description: Default conventions for writing tests — where tests live, which level to test at, structure, naming, mocking boundaries, determinism and coverage. Use when writing or changing tests. For judging whether tests prove a change, use check-testing. --- The repo's own testing doc and runner configuration win over these. `check-testing` is the review side of the same rules. ## Where and what - **Every behaviour change comes with tests.** Bug fixes come with a regression test that fails before the fix. - **Tests live next to the code** (`*.test.ts`, `test_*.py`), unless the repo has another convention. - **Test the contract, not the implementation**, so a refactor doesn't break tests. - **Pick the level by confidence per cost**: - unit tests for pure logic (fast, no I/O; the bulk of the suite) - integration tests across real boundaries (database, HTTP) - a few end-to-end tests for the user journeys that matter ## How - **Arrange / Act / Assert**, visibly separated. One behaviour per test. Several `expect`s are fine if they check that one behaviour. - **Name tests after the behaviour**: `"returns 404 for an unknown team"`, not `"getTeam test 3"`. - **Mock only at process boundaries**: network, time, filesystem, third-party APIs. Never mock modules the project owns. - **Deterministic**: inject clocks and random generators; no sleeps, no order dependence, no shared mutable state. Each test creates and cleans up its own data, with unique names when the data is shared. - **Integration tests use their own database**, never the development one. - **Cover the unhappy paths**: invalid input, missing data, denied access, boundaries. - **Coverage is a signal, not a goal.** 70% on the hard parts beats 100% on trivial code. ## Frontend - Testing Library queries by role, label or text (`getByRole`, `getByLabelText`); `data-testid` only as a last resort. - Assert what the user sees and can do, not component internals. - Visual regression only for design-system components, and only where the tooling exists.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · bitIO/wheelhouse | 90 | MIT |
| stella/stella | 92 | Apache-2.0 |
| stella/stella | 92 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki b6b9b88f0d29 (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
- 90check-testing
Podaje listę kontroli jakości testów: czy dowodzą kryteriów akceptacji, jaki mają poziom, czy są deterministyczne i jak działa mockowanie. - 90testing-strategy
Decyduje, co testować, na jakim poziomie i co pominąć, by testy wychwytywały realne regresje bez zamrażania projektu, przy pisaniu testów i planowaniu pokrycia zmiany. - 90testing-craft
Wyznacza, co testować, na jakim poziomie i co czyni test wartościowym, przy każdej nowej funkcjonalności. - 100testing-patterns
Opisuje strukturę testów, fixtury, fabryki i konwencje mocków przy pisaniu lub przeglądzie testów oraz plików test_ i spec. - 100senior-qa
Pomaga testować aplikacje React i Next.js w Jest, React Testing Library i Playwright, od pisania testów po analizę pokrycia i poprawę jakości testów. - 100test-strategy
Decyduje, co testować i na jakim poziomie, i pisze szybkie, deterministyczne testy zachowania zamiast szczegółów implementacji.