AI SummaryThis booster provides standardized test writing guidelines for unit tests, helping development teams maintain consistency in naming conventions and test structure across their codebase.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "mcp-dev-blueprints — Copilot Instructions" prompt rules to my project. Repository: https://github.com/psbds/mcp-dev-blueprints 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
Transform your organization's knowledge into intelligent AI tools with minimum development.
Examples:
`typescript it('should handle valid input correctly', async () => { // Arrange const testData = { id: 123, name: 'test' }; mockService.getData.mockReturnValue(testData); // Act const result = await functionUnderTest(testData); // Assert expect(result).toBeDefined(); expect(mockService.getData).toHaveBeenCalledWith(testData); }); ` Note: Skip the "Arrange" comment if all setup is done in beforeEach blocks: `typescript it('should use existing setup', async () => { // Act const result = await functionUnderTest(); // Assert expect(result).toBeDefined(); }); ` For exception testing, combine Act & Assert: `typescript it('should throw error for invalid input', async () => { // Act & Assert await expect(functionUnderTest(invalidData)).rejects.toThrow('Expected error'); }); `
Test Writing Guidelines
Follow these rules when creating unit tests for this project:
Rule 1: Naming Describe Blocks
Follow these naming conventions for all describe blocks to maintain consistency and readability:
First Describe Block (Module Identification)
The first describe block should use the module path relative to the source directory (without the src/ prefix and without the file extension). Pattern: describe('<module-path>', () => { ... }) Examples: • For src/config/config-manager.ts → describe('config/config-manager', ...) • For src/server/stdio_server/server.ts → describe('server/stdio_server/server', ...) • For src/utils/file-utils.ts → describe('utils/file-utils', ...) This convention: • Clearly identifies the module being tested • Mirrors the actual file structure • Makes test output more readable and traceable • Follows TypeScript/Jest best practices
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts