Skip to content
Prompt

RedisInsight — Cursor Rules

by redis

AI Summary

For components requiring Router, ThemeProvider, etc., include them in : Create a test store with for Redux-connected components: Use Mock Service Worker for API mocking:

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "RedisInsight — Cursor Rules" prompt rules to my project.
Repository: https://github.com/redis/RedisInsight

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Jest and Testing Library standards, test patterns, faker usage, renderComponent helper, and mocking

Core Principles

• Write tests for all new features • Follow AAA pattern: Arrange, Act, Assert • Use descriptive test names: "should do X when Y" • CRITICAL: Never use fixed time waits - tests must be deterministic • CRITICAL: Use faker library (@faker-js/faker) for test data

Test Organization

`typescript describe('FeatureService', () => { describe('findById', () => { it('should return entity when found', () => {}); it('should throw NotFoundException when not found', () => {}); }); describe('create', () => { it('should create entity with valid data', () => {}); it('should throw error with invalid data', () => {}); }); }); `

Run a specific test file

node 'node_modules/.bin/jest' 'redisinsight/ui/src/path/to/Component.spec.tsx' -c 'jest.config.cjs'

Run a specific test by name (use -t flag)

node 'node_modules/.bin/jest' 'redisinsight/ui/src/path/to/Component.spec.tsx' -c 'jest.config.cjs' -t 'test name pattern'

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted Today
Active
Adoption1K+ stars on GitHub
8.4k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars8.4k
Forks451
Issues68
UpdatedToday
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more