testing-standards

testing-standards is a cursor rule for Cursor from coco-research/coco. It costs 407 tokens per session, scanned A, original, Apache-2.0.

A set of project rules for testing code, covering testing conventions and recommended practices.

In plain words
What is it for?
Use it when deciding how tests should be written or reviewing whether code follows the project's testing conventions.
Why use it?
It gives code changes a consistent testing approach, although the description does not specify the individual rules.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is jest.mock('../services/api');.

Good fit Use it when deciding how tests should be written or reviewing whether code follows the project's testing conventions.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/coco-research/coco
agentmods
npx agentmods add rules/coco-research/coco/testing-standards

Made for: Cursor.

Wrote 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.

agentmods badge for testing-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/coco-research/coco/testing-standards/github.svg)](https://agentmods.dev/rules/coco-research/coco/testing-standards)
Your own site
<a href="https://agentmods.dev/rules/coco-research/coco/testing-standards"><img src="https://agentmods.dev/badge/rules/coco-research/coco/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.

agentmods 80×15 button for testing-standards

Your own site · 80×15
<a href="https://agentmods.dev/rules/coco-research/coco/testing-standards"><img src="https://agentmods.dev/badge/rules/coco-research/coco/testing-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 407 This file is loaded in full into every session.
When invoked 407 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00407 $0.00407
Opus 5.5 $0.00163 $0.00163
Sonnet 5.5 $0.00081 $0.00081
Haiku 4.5 $0.00041 $0.00041

Measured 3mo ago against content hash 04ff9ef69502, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

rules/cursor-mdc/testing-standards.mdc · 76 lines

What it actually says

Testing Standards

Test Structure (AAA Pattern)

describe('UserService', () => {
  describe('createUser', () => {
    it('should create user with valid data', async () => {
      // Arrange
      const userData = { name: 'John', email: '[email protected]' };

      // Act
      const user = await userService.createUser(userData);

      // Assert
      expect(user.id).toBeDefined();
      expect(user.name).toBe('John');
    });
  });
});

Naming Conventions

// Pattern: should [expected behavior] when [condition]
it('should throw ValidationError when email is missing', () => {});
it('should return null when user not found', () => {});
it('should emit event when order is placed', () => {});

Test Categories

Type Purpose Speed
Unit Single function/class Fast
Integration Multiple components Medium
E2E Full user flow Slow

Mocking

// Mock external dependencies
jest.mock('../services/api');

// Use dependency injection for testability
const service = new UserService(mockDatabase, mockLogger);

What to Test

  • Happy path (expected behavior)
  • Edge cases (empty, null, max values)
  • Error conditions (invalid input, failures)
  • Boundary conditions (limits, transitions)

What NOT to Test

  • Third-party library internals
  • Framework code
  • Trivial getters/setters
  • Implementation details (test behavior, not code)

Test Isolation

  • Each test should be independent
  • Use beforeEach for setup, afterEach for cleanup
  • Never depend on test execution order
  • Reset mocks between tests
Changes

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.

  1. 3mo ago First seen · 76 lines · 407 tokens per session scan A 04ff9ef69502

Subscribe to this mod's changes

testing-standards is a cursor rule published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 407 tokens to every session, about $0.0016 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-08-30.

Related

testing-standards compared with cursor rules from other repositories

testing-standards next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
testing-standardscoco-research/cocoCursor rule323yesterdayApache-2.0A407Cursor
tf-plananmolnagpal/devops-skillsCursor rule92d agoMITB4,253Cursor
orchestrator-mainmadebyaris/agent-orchestrationCursor rule217mo agoMITA11Cursor
tasksavedpixel/ai-agent-rules-generatorCursor rule87mo agoMITA1,949Cursor
browser-ops-agentguorunjie/skillpack-forgeCursor rule16mo agoMITA104Cursor
docs-ops-demoguorunjie/skillpack-forgeCursor rule16mo agoMITA126Cursor
databaseItamarZand88/awesome-agent-conventionsCursor rule384mo agoMITA444Cursor