tdd-workflow
/tdd-workflow
Pisze fixturę i nieudany test node:test, sprawdza czerwień, wprowadza najmniejszą zmianę i refaktoryzuje przy zielonych testach w TS Inspector.
- Autor
- hamza-u ↗
- Repozytorium
- ts-inspector ↗
- 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 fixturę i nieudany test node:test, sprawdza czerwień, wprowadza najmniejszą zmianę i refaktoryzuje przy zielonych testach w TS Inspector.
Oryginalny opis (EN)
Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.
Jak działa
- Cycle
- Rules
Podgląd SKILL.md
---
name: tdd-workflow
description: Test-first workflow for TS Inspector. Write a fixture and a failing node:test, watch it fail, make the smallest change to pass, then refactor. Use when adding a check, a parser, a panel, a command option, or when fixing a bug.
license: MIT
metadata:
origin: adapted from ECC skills/tdd-workflow
---
# TDD workflow
## Cycle
1. **Name the behaviour.** One sentence: "A PMT with a CRC error raises a priority 1 CRC error on its PID."
2. **Make the input.** Add a generator to `scripts/make_fixtures.py` that writes the smallest `.ts` that shows the behaviour. Run `python3 scripts/make_fixtures.py`. Never commit a private capture.
3. **Write the test.** Add it to the suite that owns the area: `test/core.test.js`, `test/analyse.test.js`, `test/timeline.test.js`, `test/cli.test.js`, and so on. For a new fixture, add `test/golden/<name>.json` with the expected counts.
4. **Run it and see it fail** for the right reason:
```sh
node --test --test-name-pattern "CRC error" test
```
A test that passes before the change proves nothing. Fix the test.
5. **Make it pass** with the smallest change in `src/`.
6. **Refactor**, then run the whole suite: `node --test test`.
7. **Record the evidence** in your report: the failing line from step 4 and the pass count from step 6.
## Rules
- A bug fix starts with a test that reproduces the bug.
- Test behaviour through the public function (`inspect`, `analyse`, the command), not private helpers.
- Golden files change only when the expected behaviour changes. Say why in the commit body.
- Tests that need `vendor/` use `{ skip: !HAVE }`. CI has no `vendor/`.
- Keep each test under about a second. `test/perf.test.js` is the only throughput test.
- Malformed input gets its own test: truncated packet, bad section length, wrong sync byte. The result is an error row, not an exception.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · hamza-u/ts-inspector | 100 | MIT |
| drvoss/everything-copilot-cli | 100 | MIT |
| momochenisme/speclink | 100 | MIT |
| travisjneuman/.claude | 100 | MIT |
| Reprograme/redevkit | 100 | MIT |
| kookr-ai/kookr | 100 | Apache-2.0 |
| madappgang/magus | 100 | MIT |
| aAAaqwq/AGI-Super-Team | 100 | MIT |
| affaan-m/ECC | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 172c65a3c9de (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
- 100red-green-refactor
Prowadzi przez cykl TDD red-green-refactor: najpierw test, który pada, potem minimalny kod przechodzący test i refaktoryzacja przy zielonych testach. - 100st-tdd
Naprawia błąd, najpierw pisząc test, który pada z właściwego powodu, a potem najmniejszą zmianę, która go przepuszcza. - 100acp-test-first
Pisze najpierw nieudany test, a potem wprowadza najmniejszą zmianę, by go przeszedł, przy naprawie błędu albo zmianie zachowania w projekcie z frameworkiem testowym. - 100test-driven-development
Prowadzi implementację zmian test najpierw: test pada, minimalny kod przechodzi, a refaktoryzacja odbywa się przy zielonych testach. - 100ds-tdd
Pisze test regresji dla zgłoszonego błędu, sprawdza, że nie przechodzi z właściwego powodu, i dopiero potem poprawia kod najmniejszą zmianą. - 100ds-tdd
Naprawia błąd, najpierw pisząc test, który nie przechodzi z właściwego powodu, a potem wprowadzając najmniejszą zmianę, która go przepuszcza.