Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

test-writer

/test-writer

Pisze sensowne testy automatyczne dla JavaScriptu, TypeScriptu (Vitest, Jest, Testing Library, Playwright) i Pythona (pytest), zgodnie z konwencjami projektu.

Repozytorium
kiln ↗
Licencja
MIT
Ostatnia zmiana repozytorium
09.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
2
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 09.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 sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/detect_test_setup.sh

Co robi i kiedy

Pisze sensowne testy automatyczne dla JavaScriptu, TypeScriptu (Vitest, Jest, Testing Library, Playwright) i Pythona (pytest), zgodnie z konwencjami projektu.

Wyzwalacze z opisu

bikin testbuat unit test
Oryginalny opis (EN)

Write meaningful automated tests for JavaScript/TypeScript (Vitest, Jest, Testing Library, Playwright) and Python (pytest) that follow the project's existing conventions. Use whenever the user asks to add tests, improve coverage, "bikin test", "buat unit test", test a function/component/endpoint, or after implementing a feature that has no tests.

Jak działa

  1. 1. Detect the setup — never assume
  2. 2. Decide what to test
  3. 3. Write the tests
  4. 4. Prove the tests are real
  5. 5. Report
Sekcje z nagłówków SKILL.md, w oryginale · 47 linii, 397 słów
Podgląd SKILL.md
---
name: test-writer
description: Write meaningful automated tests for JavaScript/TypeScript (Vitest, Jest, Testing Library, Playwright) and Python (pytest) that follow the project's existing conventions. Use whenever the user asks to add tests, improve coverage, "bikin test", "buat unit test", test a function/component/endpoint, or after implementing a feature that has no tests.
---

# Test Writer

Good tests fail when behavior breaks and pass when it doesn't. They're not coverage padding.

## 1. Detect the setup — never assume

Run `scripts/detect_test_setup.sh` from the project root. It reports the framework, test command, and where existing tests live.

Then open 1–2 existing test files near the target code and copy their conventions: file naming (`*.test.ts` vs `*.spec.ts`, `test_*.py`), folder (`__tests__/`, `tests/`, colocated), imports, fixtures/factories, mocking style. Consistency beats your preferences.

If there is no test setup at all, propose one (Vitest for Vite/TS projects, Jest otherwise; pytest for Python) and ask before installing.

## 2. Decide what to test

Read the target code and list behaviors, not lines:
- **Happy path** — the main expected use
- **Edge cases** — empty input, zero, negative, very large, unicode, `null`/`None`/`undefined`, duplicate items
- **Error paths** — invalid input raises/rejects with the right error
- **Boundaries** — exactly at limits (`<` vs `<=`)
- **State/side effects** — what gets written, called, emitted

Prioritize by risk: business logic and data transforms first; trivial getters last or never.

## 3. Write the tests

Principles:
- One behavior per test, named as a sentence: `it("returns empty list when no users match")`, `def test_returns_empty_list_when_no_users_match()`.
- Arrange / Act / Assert, visibly separated.
- Assert on outputs and observable effects, not on internal implementation details.
- Mock only at the edges (network, time, filesystem, randomness, external APIs). Don't mock the code under test.
- Deterministic: freeze time (`vi.useFakeTimers()`, `freezegun`/`time-machine`), seed randomness, no real network.
- Use parametrization for input tables: `it.each` / `test.each`, `@pytest.mark.parametrize`.
- React components: Testing Library, query by role/label text (`getByRole("button", { name: /simpan/i })`), use `userEvent`, not implementation selectors.
- Python async: `pytest-asyncio` if the project uses it.
- API endpoints: FastAPI `TestClient` / Django test client / supertest for Express.

## 4. Prove the tests are real

1. Run the new tests — they must pass.
2. **Mutation check**: temporarily break the code under test (flip a condition, return early) and confirm at least one new test fails. Revert. A test that can't fail is worthless.
3. Run the whole related suite to make sure nothing else broke.

## 5. Report

Briefly list: which behaviors are now covered, anything deliberately skipped (and why), and any bugs the tests uncovered — report those to the user rather than silently "fixing" the test to match buggy behavior.
Pliki w paczce (2)
  • SKILL.md 3 KB
  • scripts/detect_test_setup.sh 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · KILN-skills/kiln90MIT
miniidealab/openlogos100Apache-2.0
sofetizm/test-writer100MIT
anchildress1/awesome-ai100MIT
hamzafarooq/claude-code-starter100MIT
smykla-skalski/sai90MIT
toss/react-simplikit90MIT

Migawka bazy z 13.11.2026 · wersja paczki d74c60d816a1 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100test-generator
    Generuje testy jednostkowe, integracyjne i end-to-end dla istniejącego kodu w Jest, Vitest, Pytest, Playwright, React Testing Library i Cypress, z asercjami, przypadkami brzegowymi i mockami.
  • 100testing
    Pisze testy jednostkowe, integracyjne, E2E, obciążeniowe i a11y w pytest, vitest, jest i Playwright, z fixtures i mockami.
  • 100testing-patterns
    Opisuje wzorce pytest z moto, Jest i Vitest z React Testing Library oraz Playwright E2E, także przy debugowaniu porażek.
  • 91javascript-testing-patterns
    Buduje strategie testów w JavaScript i TypeScript przez Jest, Vitest i Testing Library, z mockowaniem, fixture i TDD.
  • 100nextjs-testing
    Pisze testy jednostkowe Jest lub Vitest z React Testing Library oraz testy E2E Playwright dla projektów Next.js, w tym mockowanie API przez MSW.
  • 100react-testing
    Testuje komponenty React z React Testing Library oraz Jest lub Vitest.

Uwagi i zgłoszenia

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