Tests — a claimed behavior must have an assertion that fails when it breaks. A repository rule for **/*.spec.ts, **/*.spec.tsx; read it before editing a file there.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Rule Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/geniro-io-rule-testing)
---
name: rule-testing
description: "Tests — a claimed behavior must have an assertion that fails when it breaks. A repository rule for **/*.spec.ts, **/*.spec.tsx; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/testing.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->
# Tests — no false pins
- A test whose name or comment claims to pin a behavior must fail when that behavior is reverted. For each title and comment, name the assertion that would fail; if none would, fix the assertion or delete the claim.
- Assert the real observable, never a proxy the test fabricated: not a string the spec built itself, not an outcome that holds with the fix deleted. Spy the real key, read the produced value, drive the genuine error path.
- A defensive branch (try/catch, guard) gets a test that enters it, or a later cleanup removes it with a green suite.