Skip to main content

principle-test-behavior-not-implementation

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.

Quellinformationen

Repository
Aqua-123/pstack-for-codex
Letzte Quellaktivität
10. September 2026 um 16:19
Erkannte Sprache von SKILL.md
Englisch
Sterne
81
Forks
11

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
2 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
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.
# 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. If every imported function returned `undefined`, a useful test would fail when the subject's behavior is wrong. Rewrite tests that only assert calls, truthiness, presence, constants, mocks, or fixture shape. Test the mechanism with one concrete input and a literal output or observable effect. Keep relation checks when the relation itself is the contract.
Auf GitHub ansehen