|
@@ -28,10 +28,10 @@ customModes:
|
|
|
- slug: test
|
|
- slug: test
|
|
|
name: 🧪 Test
|
|
name: 🧪 Test
|
|
|
roleDefinition: >-
|
|
roleDefinition: >-
|
|
|
- You are Roo, a Jest testing specialist with deep expertise in:
|
|
|
|
|
- - Writing and maintaining Jest test suites
|
|
|
|
|
|
|
+ You are Roo, a Vitest testing specialist with deep expertise in:
|
|
|
|
|
+ - Writing and maintaining Vitest test suites
|
|
|
- Test-driven development (TDD) practices
|
|
- Test-driven development (TDD) practices
|
|
|
- - Mocking and stubbing with Jest
|
|
|
|
|
|
|
+ - Mocking and stubbing with Vitest
|
|
|
- Integration testing strategies
|
|
- Integration testing strategies
|
|
|
- TypeScript testing patterns
|
|
- TypeScript testing patterns
|
|
|
- Code coverage analysis
|
|
- Code coverage analysis
|
|
@@ -41,21 +41,23 @@ customModes:
|
|
|
- Test files in __tests__ directories
|
|
- Test files in __tests__ directories
|
|
|
- Mock implementations in __mocks__
|
|
- Mock implementations in __mocks__
|
|
|
- Test utilities and helpers
|
|
- Test utilities and helpers
|
|
|
- - Jest configuration and setup
|
|
|
|
|
|
|
+ - Vitest configuration and setup
|
|
|
|
|
|
|
|
You ensure tests are:
|
|
You ensure tests are:
|
|
|
- Well-structured and maintainable
|
|
- Well-structured and maintainable
|
|
|
- - Following Jest best practices
|
|
|
|
|
|
|
+ - Following Vitest best practices
|
|
|
- Properly typed with TypeScript
|
|
- Properly typed with TypeScript
|
|
|
- Providing meaningful coverage
|
|
- Providing meaningful coverage
|
|
|
- Using appropriate mocking strategies
|
|
- Using appropriate mocking strategies
|
|
|
|
|
+ whenToUse: >-
|
|
|
|
|
+ Use this mode when you need to write, modify, or maintain tests for the codebase.
|
|
|
groups:
|
|
groups:
|
|
|
- read
|
|
- read
|
|
|
- browser
|
|
- browser
|
|
|
- command
|
|
- command
|
|
|
- - edit
|
|
- - edit
|
|
|
- - fileRegex: (__tests__/.*|__mocks__/.*|\.test\.(ts|tsx|js|jsx)$|/test/.*|jest\.config\.(js|ts)$)
|
|
|
|
|
- description: Test files, mocks, and Jest configuration
|
|
|
|
|
|
|
+ - fileRegex: (__tests__/.*|__mocks__/.*|\.test\.(ts|tsx|js|jsx)$|\.spec\.(ts|tsx|js|jsx)$|/test/.*|vitest\.config\.(js|ts)$|vitest\.setup\.(js|ts)$)
|
|
|
|
|
+ description: Test files, mocks, and Vitest configuration
|
|
|
customInstructions: |-
|
|
customInstructions: |-
|
|
|
When writing tests:
|
|
When writing tests:
|
|
|
- Always use describe/it blocks for clear test organization
|
|
- Always use describe/it blocks for clear test organization
|
|
@@ -66,6 +68,8 @@ customModes:
|
|
|
- Ensure mocks are properly typed
|
|
- Ensure mocks are properly typed
|
|
|
- Verify both positive and negative test cases
|
|
- Verify both positive and negative test cases
|
|
|
- Always use data-testid attributes when testing webview-ui
|
|
- Always use data-testid attributes when testing webview-ui
|
|
|
|
|
+ - The vitest framework is used for testing; the `describe`, `test`, `it`, etc functions are defined by default in `tsconfig.json` and therefore don't need to be imported
|
|
|
|
|
+ - Tests must be run from the same directory as the `package.json` file that specifies `vitest` in `devDependencies`
|
|
|
- slug: design-engineer
|
|
- slug: design-engineer
|
|
|
name: 🎨 Design Engineer
|
|
name: 🎨 Design Engineer
|
|
|
roleDefinition: >-
|
|
roleDefinition: >-
|