test-authoring-edho-ferdian
Write unit and component tests well: React Testing Library, pytest, Go and Vue, plus regression-test patterns. Use for "tulis test untuk component ini", "bagaimana test hook ini", "test yang bagus untuk fitur X", "tulis test pytest/Go/Vue", or dev-kickoff's TEST stage.
- License 许可
- MIT
- 所属仓库
- edhoferdian/EEF
- 最近更新
- 2026-10-30
- Stars
- ★ 22
- Forks
- 0
01 前言 Front Matter
- name
- test-authoring-edho-ferdian
- metadata
- { "last_reviewed": "2026-10-27" }
- description
- Write unit and component tests well: React Testing Library, pytest, Go and Vue, plus regression-test patterns. Use for "tulis test untuk component ini", "bagaimana test hook ini", "test yang bagus untuk fitur X", "tulis test pytest/Go/Vue", or dev-kickoff's TEST stage.
02 资源文件 6
- 参考文档references/baseline-testing-standards.md6.0 KB
- 参考文档references/go.md10.9 KB
- 参考文档references/python-pytest.md14.2 KB
- 参考文档references/react.md13.3 KB
- 参考文档references/regression-testing.md5.9 KB
- 参考文档references/vue.md13.3 KB
03 SKILL.md 正文
Test Authoring — Edho Ferdian Mode
You are helping someone write a unit or component test — choosing queries, structuring setup, mocking the network, testing a hook in isolation, asserting the right thing the first time. This skill is about craft at the point of authorship, not about judging a test after the fact.
The three-way boundary (read this before anything else)
This ecosystem has three other skills that sound adjacent to this one. They are not substitutes for each other — each answers a different question:
| Skill | Question it answers | When it runs |
|---|---|---|
| test-authoring-edho-ferdian (this skill) | How do I write this test well? Query choice, async handling, mocking, hook isolation, a11y assertions, snapshot discipline. | While the test is being written — during dev-kickoff's TEST stage, or any time someone is authoring a new unit/component test. |
code-review-edho-ferdian → references/test-quality-lens.md (TQ-01..06) |
Is this already-written test actually good? Behavioral mapping, edge-case/error-path coverage, assertion strength, flakiness, isolation/naming, coverage-vs-behavior divergence. | After code exists, during review — judges tests that already exist, doesn't teach how to write new ones. |
dev-kickoff-edho-ferdian → references/test-design-checklist.md |
Which edge-case categories and anti-patterns apply, regardless of stack? An 8-category checklist (null/undefined, empty, invalid types, boundary values, error paths, race conditions, large data, special characters) and 4 anti-patterns. Stack-agnostic — no React/Jest/pytest specifics. | Both by this skill (to decide which cases to author tests for) and by reviews (to check which cases got missed). It is the shared checklist, not owned by either side. |
| e2e-testing-edho-ferdian | Does this full user journey work end-to-end in a real browser? Login → checkout, multi-page flows, anything touching money or auth. | Separate layer entirely — Playwright/Chrome-DevTools-driven, Page Object Model, journey mapping. Not unit or component level. |
In short:
- This skill = authoring. It teaches the mechanics of writing a good test before it exists.
- test-quality-lens = reviewing. It judges a test that already exists, with tool-backed evidence (run the suite, run coverage) before labeling anything High confidence.
- test-design-checklist = the shared checklist. Both authoring and review should apply its 8 categories and 4 anti-patterns; it belongs to neither exclusively.
- e2e-testing = a different layer. Full user flows in a real browser, not the unit/component tests this skill covers.
If someone asks "is this test any good?" about code that's already written,
point them at code-review-edho-ferdian's test-quality-lens instead of this
skill. If someone asks "does the whole login flow work?", point them at
e2e-testing-edho-ferdian. This skill is for the moment of writing a new
unit or component test.
Evaluating an agent's reliability (pass@k / pass^k, model-based vs code-based graders) is a different discipline from authoring software tests and lives in
gan-harness-edho-ferdian/references/evaluate-phase.md, not here.
Core principle
Test what the user sees and does, not implementation details.
A good test:
- Renders the component with the same providers it has in production.
- Interacts via accessible queries (role, label) and
userEvent. - Asserts visible output and observable side effects (a callback fired, a request was sent) — not internal state, not which hooks ran, not render count.
Apply the stack-agnostic edge-case categories from
dev-kickoff-edho-ferdian/references/test-design-checklist.md when deciding
which cases to write tests for — this skill covers how to write each one
well once you've decided it belongs.
Baseline standards (stack-agnostic)
references/baseline-testing-standards.md— the numbers and the loop: the 80% coverage floor (and its three qualifications), the unit/ integration/E2E layer split, RED→GREEN→REFACTOR, Arrange-Act-Assert structure, behaviour-describing naming, the diagnose-in-order protocol for a failing test, and how to close a coverage gap deliberately rather than file-by-file. Read this before authoring in any stack — the stack-specific files below cover how, this file covers how much and in what order.
Stack-specific guidance
-
React / Testing Library:
references/react.md— query priority,userEvent.setup()discipline, async assertions, MSW network mocking,renderHookfor custom hooks (including the shared-QueryClient flake trap),jest-axeaccessibility assertions, the RTL vs Playwright Component Testing vs full E2E decision boundary, and coverage expectations per layer. -
Regression tests (stack-agnostic):
references/regression-testing.md— writing the test a found bug earned, the four recurring regression patterns (dual-path shape drift, projection omission, error-state leakage, missing rollback), DB-free sandbox-mode testing, and why AI self-review is not evidence. -
Python/pytest:
references/python-pytest.md— fixtures and scoping, parametrize withids,unittest.mock/pytest-mock(patch-site rule,autospec),pytest-asyncioasync tests andAsyncMock, coverage configuration. -
Go:
references/go.md— table-driven tests,t.Runsubtests (including the loop-variable capture trap), interface-based mocking, testify vs stdlibtesting, benchmark tests. -
Vue:
references/vue.md— Vue Test Utils mount strategies, testing Composition API composables in isolation, Pinia store testing withcreateTestingPinia, Vitest async-update handling.
When a stack isn't covered above, apply the core principle and the stack-agnostic checklist above by hand, and note in your response that stack-specific guidance for that language isn't written yet — don't silently fall back to React-flavored advice for a non-React stack.
Language routing (fixed — see skill-authoring-edho-ferdian's canonical contract)
Communication to the user in Bahasa Indonesia; test code, test names, and
assertions in English — fixed, never ask. Full contract:
skill-authoring-edho-ferdian §7.
04 同仓库更多 Skills
video-style-edho-ferdian
Measure a reference video's look and pacing (colour grade as a 3D LUT, cut rhythm, overlays) and reproduce it: grade, cut and composite new footage, verify numerically, hand off an NLE timeline. Use for "tiru look video ini", "samakan grading", "bikin video dengan gaya referensi", "LUT dari referensi", "cut rhythm".
test-authoring-edho-ferdian
Write unit and component tests well: React Testing Library, pytest, Go and Vue, plus regression-test patterns. Use for "tulis test untuk component ini", "bagaimana test hook ini", "test yang bagus untuk fitur X", "tulis test pytest/Go/Vue", or dev-kickoff's TEST stage.
system-design-edho-ferdian
Mid-project architecture decisions: ADRs, trade-off analysis, non-functional requirements, scaling tiers and blast radius. Use for "desain arsitektur", "keputusan teknis besar", "bikin ADR", "trade-off antara X dan Y", "microservices atau monolith", "apa yang rusak kalau X diubah", or a capacity question.
spec-mining-edho-ferdian
Extract behavioural specs from a codebase with none: WHEN/THEN requirements and invariants, each anchored to the code that enforces it, unclear behaviour recorded as uncertainty. Use for "ekstrak spec", "buat spec dari kode", "reverse-engineer the spec", "repo ini tidak ada dokumentasi", or a missing BEHAVIOR_SPEC in dev-kickoff.
skill-authoring-edho-ferdian
Create and govern this ecosystem's skills: search before building, a quality bar, compliance checks, promoting repeated principles to rules, and packaging dist/*.skill. Use for "bikin skill baru", "ada skill buat X gak", "fork skill ini", "skill gue kepake gak sih", "package skill ini", "buatkan .skill-nya".
skill-audit-edho-ferdian
Audit this repo's skills/ for staleness, redundancy, broken cross-references and weak descriptions (not the ~/.claude setup: that is config-hygiene). Use for "audit skill saya", "cek skill yang sudah dibuat", "ada yang redundan gak", "skill mana yang basi".