✨ Set up Copilot instructions with .cursorrules and AI prompts #378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive GitHub Copilot instructions to help AI assistants understand and work effectively with the Riteway testing library.
What's Added
.cursorrulesA comprehensive project configuration file that provides AI assistants with:
npm test,npm run lint, etc.){given, should, actual, expected}assertion pattern/aiDirectory with Specialized PromptsA collection of detailed guides for common development scenarios:
test-writing.md- Comprehensive patterns for writing Riteway tests with examples for pure functions, async operations, error handling, and React componentscomponent-testing.md- React component testing patterns usingrender()andmatch()utilities, including event handling and conditional renderingapi-development.md- Guidelines for extending the Riteway API while maintaining backward compatibility and design principlesdebugging.md- Common test failure patterns and debugging strategies with solutions for async issues, object comparisons, and environment problemsrefactoring.md- Safe refactoring techniques for both test code and production code with step-by-step examplesAI_SETUP.mdDocumentation explaining how the AI assistance works and what benefits developers can expect when using compatible AI tools.
Benefits for Developers
AI assistants will now:
Example Improvement
Before this setup, an AI might generate generic test code:
After this setup, AI assistants will generate proper Riteway tests:
The configuration automatically activates when using compatible AI tools - no additional setup required.
Fixes #377.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.