Generates mocks, stubs, spies, and fakes automatically to streamline unit testing and dependency isolation across various testing frameworks.
The Automated Test Doubles Generator skill simplifies the complex process of unit testing by identifying code dependencies and automatically creating appropriate test doubles. By supporting popular frameworks like Jest and Sinon, it allows developers to quickly isolate units of code without the manual overhead of writing mock objects. Whether you need to simulate API responses, control service behaviors with stubs, or track function calls with spies, this skill provides production-ready code snippets that integrate directly into your test suite via simple CLI commands like /gen-doubles.
Key Features
013 GitHub stars
02Direct code insertion for seamless test integration
03Intelligent dependency analysis of source code
04Support for major frameworks including Jest and Sinon
05Automated generation of mocks, stubs, spies, and fakes
06Quick-trigger CLI commands (/gen-doubles, /gd)
Use Cases
01Implementing spies to verify interaction patterns and method call counts
02Creating service stubs to simulate specific error states or edge cases
03Mocking external API fetch calls to test data services in isolation