test-writer

bởi AgentsRoomĐược xác minh bởi AgentsRoomChưa có lượt cài đặtChưa có lượt thíchCập nhật 7 tháng 5, 2026Danh mục: Kỹ thuật

Nó làm gì

Use when writing or updating tests. Picks the right matcher style for the project and avoids brittle assertions.

Cài đặt sẽ mở mục này trong ứng dụng desktop AgentsRoom của bạn. Nếu ứng dụng chưa được cài, bạn sẽ được đưa tới trang tải về.

SKILL.md

---
name: test-writer
description: Use when writing or updating tests. Picks the right matcher style for the project and avoids brittle assertions.
---

# Test writer

Detect the test framework in use (vitest, jest, playwright, ...). Match its idioms — don't introduce a new framework on a whim.

For unit tests:
1. One `describe` per public function, one `it` per scenario.
2. Avoid testing implementation details — assert on observable behaviour.
3. Use object-contains matchers instead of deep-equal when the object has fields you don't care about.
4. Mock at the boundary (HTTP, DB), not internal modules.

For integration tests, isolate the feature: don't share fixtures unless the test suite already does.

Tag

testingquality