Writing Specs

Author good Ginkgo specs — container nodes (Describe/Context/When), subject nodes (It/Specify), setup/cleanup nodes (BeforeEach, JustBeforeEach, AfterEach, DeferCleanup, BeforeSuite/AfterSuite), the "declare in container, initialize in BeforeEach" rule, separating creation from configuration, reusable test helpers with GinkgoHelper()/GinkgoHelperGo(), and By/GinkgoWriter output. Use when writing or reviewing specs or extracting a test helper. Covers the tree-construction-time pitfalls (no assertions/init/loop-capture in container bodies).

onsi ed3aa0c 7.8 KB Updated

File contents

onsi/ginkgo/tree/main/plugins/ginkgo/skills/writing-specs commit ed3aa0c37b

Frequently asked questions

npx skillmds@latest add onsi/writing-specs