Write Tests

Write or fix a test without writing one that passes while proving nothing. Covers vacuous assertions, tests that encode the bug, green from two cancelling faults, unscoped queries, fixtures the product never produces, shared state between tests, sleeps instead of conditions, probe-and-skip fake passes, and mocks so broad the test asserts nothing about real code. Use whenever authoring a test, changing one, reviewing one, or asking whether a green suite actually means anything.

MichaelLeeHobbs 7cf41a5 2 files · 22.7 KB Updated

File contents

MichaelLeeHobbs/skills/tree/main/skills/engineering/write-tests commit 7cf41a5ad8

Frequently asked questions

npx skillmds@latest add michaelleehobbs/write-tests