Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

write-tests

/write-tests

Pisze lub zmienia testy Wavefunction w ramach budżetu przypadków i czasu, korzystając z istniejących fikstur.

Repozytorium
wavefunction ↗
Licencja
MIT
Ostatnia zmiana repozytorium
07.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 07.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

Pisze lub zmienia testy Wavefunction w ramach budżetu przypadków i czasu, korzystając z istniejących fikstur.

Oryginalny opis (EN)

Write or change Wavefunction tests that earn their place under the case and time budget, using the existing fixtures. Use when adding a regression test, testing a new behavior, or a test fails for reasons you need to understand.

Jak działa

  1. Before adding a test
  2. Backend (backend/tests/)
  3. Frontend (frontend/src/)
  4. After
Sekcje z nagłówków SKILL.md, w oryginale · 34 linii, 412 słów
Podgląd SKILL.md
---
name: write-tests
description: Write or change Wavefunction tests that earn their place under the case and time budget, using the existing fixtures. Use when adding a regression test, testing a new behavior, or a test fails for reasons you need to understand.
---

# Write tests

The policy is in [docs/TESTING.md](../../../docs/TESTING.md): a budget of 240 backend and 230 frontend cases, 30 s per backend test, and a time limit for each suite.

## Before adding a test

- **Find the existing test for this behavior.** Tests drive the HTTP API, so search by route or behavior: `rg -l "/fork" backend/tests/`, `rg -l "composer" frontend/src`. Extending a test of the same workflow is often better than a new case.
- **Make a bug fix's test fail first.** Run it against the code without your fix and see it fail for the reason you claim. A test that passes either way is not a regression test.
- **Decide what to assert.** What the user sees, what the API returns, what reaches disk or the model. Not private helpers, markup, CSS or source text.
- **Watch the budget.** Near it, replace a weaker test instead of adding one. Never merge unrelated scenarios to save a case.

## Backend (`backend/tests/`)

- **Fixtures** (`conftest.py`): `coding` gives `(client, workspace, services)` on a temporary data folder. Helpers (`support.py`): `create(client, ...)` makes a chat; `repository(tmp_path)` and `git(...)` make a synthetic Git repository. Import helpers from `support`, never from another test module.
- **Scripted model.** `script_gateway(services.models, [...])` with `tool_call_message(name, args, id)` and `AIMessage(...)` drives a real tool loop without a model. Then `ws.send(thread_id, text)` and `services.runtime.wait(run_id)`.
- **Markers.**
  - `@pytest.mark.sandbox` for anything that runs a command through the app's tools: Git, edits, terminals, discovery.
  - `@pytest.mark.destructive` if it runs a real deletion command, even in a temporary repository. That test then runs only in CI.
  - Cleanup that only deletes temporary folders isn't needed: pytest discards `tmp_path`.
- **No sleeps.** Wait for state, not time: the existing tests poll a condition with a deadline. Keep each test under 30 s.
- **Run from `backend/`.** `uv run --no-sync pytest tests/test_x.py -k name`. IDs and `--deselect` paths are relative to it.

## Frontend (`frontend/src/`)

- **Placement.** Tests sit next to the code (`x.test.tsx`), with Testing Library and `userEvent`.
- **Queries.** Find elements by role and accessible name, the way a user or browser automation would.
- **Mocks.** Mock the API at `coding/api.ts` or `lib/api.ts` and assert where requests go and what the user sees.
- **Time.** Each test has 5 s.

## After

Run `npm run check`. If a test is flaky, fix it; don't retry or add a sleep. If you can't fix it now, skip it with `reason="flaky: <issue link>"` and open an issue.

Wersje

RepozytoriumWynikLicencja
Ta strona · stoyan-stoyanov/wavefunction90MIT
onsi/biloba100MIT
runwield/runwield100MIT
dzhng/jevgrep100MIT
lukedj78/dev-flow100MIT
dzhng/skills100MIT
rowansci/rowan-python100MIT
yaohuangguan/agent-playbook100MIT
microsoft/semantic-link-labs100MIT

Migawka bazy z 13.11.2026 · wersja paczki 40f0ce2363d8 (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

  • 100rebuild-wavefunction
    Przebudowuje i ponownie uruchamia lokalną aplikację macOS Wavefunction z dołączonym sidecarem Python, zachowując rozmowy i dane logowania.
  • 100package-wavefunction-install-kit
    Buduje i sprawdza przenośne archiwum ZIP aplikacji Wavefunction na macOS z sumą kontrolną i wbudowanym Pythonem, do przesłania na inny Mac.
  • 100v1-write-tests
    Pisze testy jednostkowe do zmian w kodzie i nowej funkcjonalności, zanim trafią do przeglądu.
  • 90test-writer
    Pisze testy sprawdzające zachowanie zamiast implementacji, z parametryzacją, minimalnym mockowaniem i oceną istniejących testów.
  • 100testing-python
    Pomaga pisać i oceniać testy w pytest: fixtures, parametryzację, mocki, testy asynchroniczne i integrację z CI.
  • 100awesome-test-writing
    Projektuje i pisze testy łapiące prawdziwe regresje: umiejscowienie testów jednostkowych, integracyjnych i E2E, fixtures, asercje oparte na zachowaniu, testy charakteryzacyjne i właściwości.

Uwagi i zgłoszenia

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