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.

معلومات المصدر

المستودع
Aqua-123/pstack-for-codex
آخر نشاط في المصدر
١٠ سبتمبر ٢٠٢٦ في ١٦:١٩
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٨١
التفرعات
١١

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

مستكشف الملفات
2 ملفات

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
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.
عرض على GitHub