tests

tests is a cursor rule for Cursor from timurgaleev/vibestack. It costs 262 tokens per session, scanned A, original, MIT.

A set of software testing rules requiring unit and integration tests, an 80% minimum coverage target, and a test-first workflow. TDD, or test-driven development, means writing a failing test before implementing the code that should make it pass.

In plain words
What is it for?
It is for testing individual functions, API endpoints, database operations, and components; checking coverage; and diagnosing test failures.
Why use it?
It gives developers a repeatable way to check new code and reduces the risk that changes break existing behavior.

Cursor rule for Cursor

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

Good fit It is for testing individual functions, API endpoints, database operations, and components; checking coverage; and diagnosing test failures.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/timurgaleev/vibestack/tests
Install

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.

Clone the repo
git clone --depth 1 https://github.com/timurgaleev/vibestack

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 tests

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/timurgaleev/vibestack/tests"><img src="https://agentmods.dev/badge/rules/timurgaleev/vibestack/tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 262 This file is loaded in full into every session.
When invoked 262 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.00262 $0.00262
Opus 5 $0.00131 $0.00131
Sonnet 5 $0.00052 $0.00052
Haiku 4.5 $0.00026 $0.00026

Measured yesterday against content hash a80a60f0aeb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-20, from the pricing page.

Security

Grade A, and why

tests 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 yesterday.

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.

config/cursor/rules/tests.mdc · 40 lines

What it actually says

Testing Requirements

Minimum Test Coverage: 80%

Test Types (ALL required):

  1. Unit Tests - Individual functions, utilities, components
  2. Integration Tests - API endpoints, database operations

Testing Workflow

Recommended workflow:

  1. Write tests for new functionality
  2. Run tests to verify they fail (if testing new code)
  3. Implement functionality
  4. Run tests to verify they pass
  5. Refactor as needed while keeping tests green
  6. Verify coverage meets 80%+ target

Troubleshooting Test Failures

  1. Read error messages carefully
  2. Check test isolation - tests should not share state
  3. Verify mocks are correct
  4. Fix implementation, not tests (unless tests are wrong)
  5. Use debugger to trace execution flow

Test Writing Guidelines

  • Fast: Unit tests should run in <10ms
  • Isolated: No shared state between tests
  • Deterministic: Same input always produces same output
  • Readable: Tests serve as documentation
  • Focused: Test one thing per test case
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. yesterday First seen · 40 lines · 262 tokens per session scan A a80a60f0aeb0

Subscribe to this mod's changes

tests is a cursor rule published in the GitHub repository timurgaleev/vibestack (6 stars, last pushed yesterday), licensed MIT. It adds 262 tokens to every session, about $0.0013 per session on Opus 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-19.

Related

Other cursor rules, from other repositories

testing

Cursor rule "testing" from kanyun-inc/reskill, covering testing rules, testing philosophy, spec-driven tdd workflow, benefits of test-first approach and example: adding --dry-run option.

kanyun-inc/reskill · 2,287 tokens

python-general-coding-standards

A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.

holtwood/awesome-cursorrules-zh · 140 tokens

unit-tests-tdd

TDD for behavior changes; co-located tests; keep touched areas well covered.

arxdsilva/vault · 427 tokens

testing

Use when writing tests, deciding on test coverage, choosing between unit/integration/E2E tests, applying TDD, or reviewing test quality — covers rigor tiers, the Red-Green-Refactor cycle, coverage requirements, and Playwright for UI testing.

andr-ca/agentharness · 52 tokens

pytest-what-to-test-and-mocking

We mock external API calls (mark live tests with @pytest.mark.flaky()). We reuse fixtures from conftest.py. We always use pytest as testing framework - never import unittest. We use pytest-mock (mocker fixture) and monkeypatch for mocking, not unittest.mock.

TechNickAI/ai-coding-config · 3 tokens

testing-mocks-spies-stubs-agent

Apply when writing unit tests that involve functions or modules with side effects (e.g., file system access, network requests, database interactions, timers, complex dependencies). Guides the use of test doubles like mocks, spies, and stubs (using frameworks like Jest) to isolate the unit under test and control its…

appboypov/pew-pew-cli · 71 tokens