Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

conventions-testing

/conventions-testing

Podpowiada domyślne zasady pisania testów: gdzie leżą, na jakim poziomie testować, jak je nazywać i mockować.

Repozytorium
wheelhouse ↗
Licencja
MIT
Ostatnia zmiana repozytorium
12.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

  1. Where and what
  2. How
  3. Frontend
Sekcje z nagłówków SKILL.md, w oryginale · 29 linii, 287 słów
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

RepozytoriumWynikLicencja
Ta strona · bitIO/wheelhouse90MIT
stella/stella92Apache-2.0
stella/stella92Apache-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.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.