

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# PRPM Testing Patterns78Expert guidance for testing the Prompt Package Manager codebase.910## Testing Philosophy1112### Test Pyramid13- **70% Unit Tests**: Format converters, parsers, utilities14- **20% Integration Tests**: API routes, database operations, CLI commands15- **10% E2E Tests**: Full workflows (install, publish, search)1617### Coverage Goals18- **Format Converters**: 100% coverage (critical path)19- **CLI Commands**: 90% coverage20- **API Routes**: 85% coverage21- **Utilities**: 90% coverage2223## Key Testing Patterns2425### Format Converter Tests26```typescript27describe('toCursor', () => {28 it('preserves all data in roundtrip', () => {29 const result = toCursor(canonical);30 const back = fromCursor(result.content);31 expect(back).toEqual(canonical);32 });3334 it('flags lossy conversions', () => {35 const result = toCursor(canonicalWithClaudeSpecific);36 expect(result.lossyConversion).toBe(true);37 expect(result.qualityScore).toBeLessThan(100);38 });39});40```4142### CLI Command Tests43```typescript44describe('install command', () => {45 it('downloads and installs package', async () => {46 await handleInstall('test-package', { as: 'cursor' });47 expect(fs.existsSync('.cursor/rules/test-package.md')).toBe(true);48 });49});50```5152### Integration Tests53```typescript54describe('registry API', () => {55 it('searches packages with filters', async () => {56 const results = await searchPackages({57 query: 'react',58 category: 'frontend'59 });60 expect(results.length).toBeGreaterThan(0);61 });62});63```6465## Best Practices66671. **Test Isolation**: Each test should be independent682. **Clear Assertions**: Use descriptive expect messages693. **Mock External Services**: Don't hit real APIs in tests704. **Test Edge Cases**: Empty inputs, null values, large datasets715. **Performance**: Keep unit tests under 100ms each7273## Running Tests7475```bash76# All tests77npm run test7879# Watch mode80npm run test:watch8182# Coverage83npm run test:coverage8485# Specific file86npm run test -- to-cursor.test.ts87```8889Remember: High test coverage ensures PRPM stays reliable as critical infrastructure.90
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pr-pm/prpm.cursor/rules/github-actions-testing.mdc · 121 | Cursor rules | setupbuildstylearch+4 | 93/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-specialist.mdc · 121 | Cursor rules | styletypesdo-notagent-behaviour | 65/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/beanstalk-deploy.mdc · 121 | Cursor rules | teststyletypes | 62/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/core-principles.mdc · 121 | Cursor rules | testlint-formatstylearch+6 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-agents-md.mdc · 121 | Cursor rules | testlint-formatstylearch+7 | 92/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-cursor-rules.mdc · 121 | Cursor rules | testlint-formatstylearch+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-kiro-agents.mdc · 121 | Cursor rules | setupbuildteststyle+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-skills.mdc · 121 | Cursor rules | stylearchtesting-strategydo-not+1 | 61/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/karen-repo-reviewer.mdc · 121 | Cursor rules | archgit | 58/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/prpm-json-best-practices.mdc · 121 | Cursor rules | setuplint-formatstylearch+5 | 73/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/self-improve-cursor.mdc · 121 | Cursor rules | setuptestarchdependencies+3 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-safety.mdc · 121 | Cursor rules | buildstylearchtypes+2 | 89/100 | 14 days ago | |
| pr-pm/prpmAGENTS.md · 121 | AGENTS.md | setupbuildtestlint-format+12 | 84/100 | 14 days ago | |
| pr-pm/prpmCLAUDE.md · 121 | CLAUDE.md | teststylegitapi+2 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/format-conversion.mdc · 121 | Cursor rules | testlint-formatstyledo-not+1 | 63/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/pr-pm-prpm-cursor-rules-testing-patterns)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.