Medusa v2 Testing Specialist
Streamlines the creation of comprehensive test suites for Medusa v2 commerce applications using Jest and specialized integration runners.
This skill provides a specialized framework for testing Medusa v2 applications, covering the full test pyramid from unit tests for module services to complex integration tests using the medusaIntegrationTestRunner. It guides developers through setting up Jest configurations, implementing workflow compensation tests, and validating API routes with Supertest. By following Medusa's official best practices and implementation patterns, it ensures that e-commerce logic is robust, side effects are correctly managed, and system updates do not break critical commerce functionality.
主要功能
01Module unit testing patterns with service-level mock implementations
02Automated Jest configuration and @medusajs/test-utils integration
0332 GitHub stars
04Integration testing using the medusaIntegrationTestRunner application container
05API route testing with authenticated request simulation and pagination checks
06Workflow validation focusing on success paths and compensation rollbacks
使用场景
01Validating API endpoint security and data consistency across store and admin routes
02Setting up a standardized testing environment for a new Medusa v2 commerce project
03Writing integration tests for complex custom workflows involving multiple linked modules