Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/girijashankarj/cursor-handbookWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/girijashankarj/cursor-handbook/testing-standards)<a href="https://agentmods.dev/rules/girijashankarj/cursor-handbook/testing-standards"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/testing-standards/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/girijashankarj/cursor-handbook/testing-standards"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/testing-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00543 | $0.00543 |
| Opus 5.5 | $0.00217 | $0.00217 |
| Sonnet 5.5 | $0.00109 | $0.00109 |
| Haiku 4.5 | $0.00054 | $0.00054 |
Grade A, and why
testing-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Standards
Coverage Requirements
- Minimum coverage: {{CONFIG.testing.coverageMinimum}}%
- Test command:
{{CONFIG.testing.testCommand}} - Coverage command:
{{CONFIG.testing.coverageCommand}}
Test Pyramid
| Level | Proportion | Speed | What to Test |
|---|---|---|---|
| Unit | 70% | Fast (<100ms) | Functions, classes, utilities |
| Integration | 20% | Medium (<5s) | API endpoints, DB queries, service interactions |
| E2E | 10% | Slow (<30s) | Critical user flows only |
Unit Test Rules
- Test one thing per test case
- Use descriptive test names:
should {expected behavior} when {condition} - Follow Arrange-Act-Assert (AAA) pattern
- Mock all external dependencies
- No real network calls, database queries, or file I/O
- Test edge cases: null, undefined, empty, boundary values
- Test error cases as thoroughly as success cases
describe('OrderService', () => {
describe('calculateTotal', () => {
it('should return sum of item prices when items exist', () => {
// Arrange
const items = [{ price: 10 }, { price: 20 }, { price: 30 }];
// Act
const result = calculateTotal(items);
// Assert
expect(result).toBe(60);
});
it('should return 0 when items array is empty', () => {
expect(calculateTotal([])).toBe(0);
});
it('should throw when items is null', () => {
expect(() => calculateTotal(null)).toThrow('Items required');
});
});
});
Mock Rules
- Use centralized mock infrastructure in
tests/mocks/ - Mock at the boundary — don't mock internal implementation
- Keep mocks simple and maintainable
- Reset mocks between tests
- Never use real credentials in test fixtures
Integration Test Rules
- Use test databases (not production)
- Clean up test data after each test (or use transactions)
- Test actual API contracts (request/response shapes)
- Test error responses and status codes
- Use factories/fixtures for test data creation
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 74 lines · 543 tokens per session scan A 7dc7b5cc5da2
testing-standards is a cursor rule published in the GitHub repository girijashankarj/cursor-handbook (33 stars, last pushed 1mo ago), licensed MIT. It adds 543 tokens to every session, about $0.0022 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
11-testing
Unit, integration, and E2E testing conventions.
testing-patterns
Testing patterns and best practices for PRPM codebase with Vitest.
nestjs-testing-guidelines
A set of testing rules for NestJS, a framework for building Node.js server applications. It standardizes Jest tests for controllers and services, plus end-to-end checks for API modules.
11-testing-standards
General testing and validation standards.
jest
Jest: describe/it, matchers, mocking, async testing.
vitest
Vitest: unit testing, mocking, coverage, snapshot testing.