Reviewed by 20X · No signed release verified
- Works with (as stated by the author)
- Cursor
Review details
- Human review
- Review recorded for these files
- Limited checks
- Limited checks recorded (v2.1.0)
- Source
- Source not verified
A verified signature checks published file bytes against a trusted publisher’s signed manifest. It does not verify safety, authorship, rights or assistant use.
Declarations and limited checks do not guarantee safety or sharing rights. Review the files before use. Access that the author has not stated is unknown.
How to use it
- 1Download the skill folder and keep its files together.
- 2Put the folder in your agent's skills directory (for Claude Code: ~/.claude/skills/ or .claude/skills/ in a project), or upload it as a skill in the Claude app.
- 3Start a new session so the skill is picked up.
- 4Keep it installed; it applies when tests are written or changed.
Community results
0 reportsNo one has shared a result yet.
1 file. Filenames and raw files are in Technical details.
name: principle-test-behavior-not-implementation description: "Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test." disable-model-invocation: true
Test Behavior, Not Implementation
A test calls the code the way its users do and asserts the result they observe against a literal expected value. A test that asserts which calls the code made, or restates a constant the code contains, does neither.
The check: before you keep a test, ask whether it would still pass if every function it imports returned undefined. If yes, it observes no behavior and cannot fail for a defect. Rewrite the assertion or delete the test.
Why: A test that cannot fail for a defect costs CI time and review attention and catches nothing. A constant pin also fails when someone edits the constant or the prompt it restates, so it prevents that edit.
Five shapes that still pass when every imported function returns undefined:
- Weak or no assertion. No
expect, or onlytoBeDefined,toBeTruthy,not.toThrow,toBeInstanceOf,toBeGreaterThan(0). - Mock or absence only. Only
toHaveBeenCalled,not.toHaveBeenCalled,toBeUndefined,toEqual([]),toHaveLength(0),not.toBe(wrongValue). - Self-referential. The expected value comes from the code under test:
expect(f(a)).toBe(f(a)),expect(parsed.url).toBe(buildUrl(...)). - Constant pin. The assertion restates a hand-maintained constant, config default, table row, or prompt string:
expect(LIMITS.maxTools).toBe(8),expect(PROMPT).toContain("You are"). - Fixture asserts fixture. The assertion reads data the test built or a value computed in
beforeEach, and the subject never runs inside the body.
The fix: call the subject inside the test body with one concrete input and assert the literal output or the observable effect, expect(slugify("Hello, World!")).toBe("hello-world"). For an absence, assert the presence on the other input in the same test. For a constant, test the mechanism that reads it with one input instead of restating the value. For a mock, assert the payload it received or the state after the call, not that it was called. When no such assertion exists, delete the test.
Keep a test of a relation across a table's rows (a key present in two tables, a parent that exists), and a compile-time check in a *.test-d.ts file.
Latest changes
Initial reviewed release.
Version history
v1.0.0
Initial reviewed release.
File access pausedFile verification
- File integrity
No signed release verified for this version.
This checks published bytes, not safety, authorship, rights or assistant use.
Full compatibility
As stated by the author: Cursor
Included files
1 fileSKILL.md
markdownPublic file access is temporarily paused.
Use in your own tool
Save this resource and connect your assistant in the Use with flow before copying a test request.
Related resources
Principle: Explain the Number
Before trusting a measured number (speedup, latency, eval score), find what limits it and rule out mis-measurement.
Cursor
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Teach Me This Code
Explains a body of work plainly by combining how-it-works and why-it-exists analysis into one clear explanation.
Cursor
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11
Figure It Out (Auditable Playbook)
Designs an auditable playbook for large migrations or ambitious changes: scaled rigour, hypothesis loop, logged decisions.
Cursor
- Rating
- Not rated
- Recorded downloads in the past 90 days
- 0
- Updated
- Nov 11