Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/testing)<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/testing"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/testing.svg" alt="Measured on agentmods" 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.00000 | $0.00737 |
| Opus 5 | $0.00000 | $0.00368 |
| Sonnet 5 | $0.00000 | $0.00147 |
| Haiku 4.5 | $0.00000 | $0.00074 |
Grade A, and why
testing 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 6d 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 — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Rules
Test Runner: Bun Test
Use Bun Test exclusively - not Vitest, not Jest.
Test File Structure
import { describe, test, expect, beforeEach, afterEach } from "bun:test";
describe("Component/Feature Name", () => {
beforeEach(() => {
// Setup
});
test("should do something specific", () => {
// Arrange
const input = "test";
// Act
const result = myFunction(input);
// Assert
expect(result).toBe("expected");
});
});
File Organization
tests/
├── unit/ # Unit tests (9 files)
│ ├── clv.test.ts
│ ├── exposure.test.ts
│ ├── sharp.test.ts
│ └── ...
├── integration/ # Integration tests (8 files)
│ ├── integration.test.ts
│ ├── queue-integration.test.ts
│ └── ...
├── e2e/ # End-to-end tests
├── mocks/ # Shared test mocks
│ ├── data.ts
│ └── env.ts
├── setup/ # Test configuration
└── utils/ # Test utilities
File Naming
Bun Test discovers files matching these patterns:
*.test.{ts,tsx}*_test.{ts,tsx}*.spec.{ts,tsx}*_spec.{ts,tsx}
Preferred: *.test.ts (e.g., clv.test.ts)
Running Tests
# All tests
bun test
# Single file
bun test tests/unit/clv.test.ts
# With coverage
bun test --coverage
# Watch mode
bun test --watch
# Specific pattern
bun test --test-name-pattern "CLV"
Mock Environment
See tests/mocks/env.ts for Cloudflare Workers environment mocks.
import { createMockEnv } from "../mocks/env";
test("should use mocked environment", () => {
const env = createMockEnv();
// Use env.ANALYTICS, env.KV, etc.
});
Test Data
See tests/mocks/data.ts for shared test fixtures.
Important Patterns
- No backup files: Never create
*.test.ts.backupfiles - Clean imports: Use Bun Test imports only
- Type safety: Leverage src/types/api.ts
- Fail fast: Tests should fail fast on errors
- Mock external services: Never call real APIs in tests
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.
- 6d ago First seen · 119 lines · 0 tokens per session scan A 52bed3d4f875
testing is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 737 tokens. 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-31.
Other cursor rules, from other repositories
test-scripts
Vitest multi-project test script 設計規範——禁止寫死 path filter 導致單檔測試靜默跳過.
verify-gate-chain
自主迴圈的驗證閘門鏈與停止條件——每個 iterate-until-green 迴圈 MUST 跑 gate chain、宣告 maxiterations、定義 escalation action.
vitest-config
Shared @repo/vitest-config factories - dual entries, Turbo package caching, Node vs Workers knobs.
front-react
Front-app Vitest - Node pool only, isolated QueryClient, no Workers pool.
testing
Vitest testing discipline - trust boundaries, no weakening source to pass tests.
workers-patterns
Skim this on every task that touches workers, env, routes, or bindings.