AI SummaryA Cursor IDE rule set providing test-driven development workflows and testing patterns specifically for Shopsys e-commerce framework projects. Developers working with Shopsys benefit from structured guidance on when and how to write tests before refactoring.
Install
# Download to your project root curl -o .cursorrules "https://raw.githubusercontent.com/shopsys/shopsys/19.0/.cursor/rules/testing.mdc"
Description
Testing frameworks and essential testing patterns
Before Refactoring/Changes
Always check for existing tests before making significant changes: • Analyze existing code - Check if the code being modified has tests • If no tests exist - Ask user: _"I notice there are no tests for [component/function] that I'm about to refactor. Would you like me to create tests first to ensure the refactoring doesn't break existing functionality?"_ • After user confirmation - Create baseline tests that verify current behavior • Proceed with changes - Make the refactoring/modifications • Verify tests pass - Ensure changes don't break functionality
After New Implementation
Always offer to create tests for new functionality: • After implementing new features - Ask user: _"I've implemented [feature/component]. Would you like me to create tests for this new functionality? This would include [unit/component/integration] tests to ensure reliability."_ • After user confirmation - Create comprehensive tests covering the new code
When to Apply This Workflow
• ✅ New components, hooks, utilities • ✅ Business logic or data processing • ✅ API endpoints or GraphQL resolvers • ✅ Complex refactoring • ✅ Bug fixes that add new logic • ❌ Minor styling changes • ❌ Text/copy updates • ❌ Simple configuration changes
Run tests
docker compose exec storefront pnpm test
Quality Score
Good
84/100
Trust & Transparency
No License Detected
Review source code before installing
Verified Open Source
Hosted on GitHub — publicly auditable
Actively Maintained
Last commit 3d ago
347 stars — Growing Community
96 forks