write-tests
/write-tests
Pisze lub zmienia testy Wavefunction w ramach budżetu przypadków i czasu, korzystając z istniejących fikstur.
- Autor
- stoyan-stoyanov ↗
- Repozytorium
- wavefunction ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 07.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 07.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 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
- Before adding a test
- Backend (backend/tests/)
- Frontend (frontend/src/)
- After
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
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · stoyan-stoyanov/wavefunction | 90 | MIT |
| onsi/biloba | 100 | MIT |
| runwield/runwield | 100 | MIT |
| dzhng/jevgrep | 100 | MIT |
| lukedj78/dev-flow | 100 | MIT |
| dzhng/skills | 100 | MIT |
| rowansci/rowan-python | 100 | MIT |
| yaohuangguan/agent-playbook | 100 | MIT |
| microsoft/semantic-link-labs | 100 | MIT |
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.