What it does
A Cursor rules file for writing unit tests with Jest in JavaScript and TypeScript projects. It tells the AI to detect TypeScript, focus on business logic and utilities, mock dependencies before imports, cover valid, invalid and edge-case inputs, and group tests with descriptive names.
Use cases
- 01Write tests for a utility function with edge cases
- 02Mock an API module before importing the code under test
- 03Group related tests in describe blocks