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/mywand/cusrsor-do-itWrote 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/mywand/cusrsor-do-it/testing)<a href="https://agentmods.dev/rules/mywand/cusrsor-do-it/testing"><img src="https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/testing/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/mywand/cusrsor-do-it/testing"><img src="https://agentmods.dev/badge/rules/mywand/cusrsor-do-it/testing.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.00000 | $0.03518 |
| Opus 5.5 | $0.00000 | $0.01407 |
| Sonnet 5.5 | $0.00000 | $0.00704 |
| Haiku 4.5 | $0.00000 | $0.00352 |
Grade A, and why
testing scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
response = requests.post( How it starts
The opening of the file, as written. The whole thing — 515 lines — stays where its author put it; the contents beside it link to each section on GitHub.
最近更新: 2025-10-10
测试策略与最佳实践
1. 测试金字塔
1.1 测试层级
/\
/ \
/ UI \ <- 少量 E2E 测试
/______\
/ \
| 集成测试 | <- 适量集成测试
|________|
| |
| 单元测试 | <- 大量单元测试
|________|
1.2 测试比例建议
- 单元测试: 70% - 快速、稳定、易维护
- 集成测试: 20% - 测试组件间交互
- 端到端测试: 10% - 测试完整用户流程
2. 单元测试
2.1 测试命名规范
// 格式: 方法名_测试场景_期望结果
describe('UserService', () => {
describe('getUserById', () => {
it('should return user when valid id provided', () => {
// 测试逻辑
})
it('should throw error when invalid id provided', () => {
// 测试逻辑
})
it('should return null when user not found', () => {
// 测试逻辑
})
})
})
2.2 AAA 模式 (Arrange-Act-Assert)
def test_calculate_discount_with_valid_inputs():
# Arrange - 准备测试数据
price = 100
discount_rate = 0.1
expected_discount = 10
# Act - 执行被测试的方法
actual_discount = calculate_discount(price, discount_rate)
# Assert - 验证结果
assert actual_discount == expected_discount
2.3 Mock 和 Stub 使用
@Test
public void shouldCreateUserSuccessfully() {
// Arrange
CreateUserRequest request = new CreateUserRequest("张三", "[email protected]");
User expectedUser = new User(1, "张三", "[email protected]");
// Mock 外部依赖
when(userRepository.save(any(User.class))).thenReturn(expectedUser);
when(emailService.sendWelcomeEmail(anyString())).thenReturn(true);
// Act
User actualUser = userService.createUser(request);
// Assert
assertEquals(expectedUser.getName(), actualUser.getName());
assertEquals(expectedUser.getEmail(), actualUser.getEmail());
// 验证交互
verify(userRepository).save(any(User.class));
verify(emailService).sendWelcomeEmail("[email protected]");
}
2.4 边界测试
describe('validateAge', () => {
it('should accept minimum valid age', () => {
expect(validateAge(0)).toBe(true)
})
it('should accept maximum valid age', () => {
expect(validateAge(150)).toBe(true)
})
it('should reject negative age', () => {
expect(() => validateAge(-1)).toThrow('年龄不能为负数')
})
it('should reject age over limit', () => {
expect(() => validateAge(151)).toThrow('年龄不能超过150岁')
})
it('should handle null input', () => {
expect(() => validateAge(null)).toThrow('年龄不能为空')
})
})
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 · 515 lines · 0 tokens per session scan A d62ac22e7a13
testing is a cursor rule published in the GitHub repository mywand/cusrsor-do-it (2 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,518 tokens. A static security scan graded it A with 1 finding (makes network calls). 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
300-testing
Comprehensive testing guide covering unit, integration, E2E, test frameworks, patterns, and CI/CD integration.
hatch3r-testing
Coverage thresholds, mocking strategy, property-based testing, mutation-score targets, flaky test quarantine, and snapshot test discipline.
testing
Cursor rule "testing" from andersonlemesc/Oryntra, covering testes oryntra, laravel (pest), python (pytest), contract tests (laravel ↔ python) and browser/e2e.
30-testing
Convenciones de testing, cobertura mínima, tipos de tests, mocks.
tester
Tester role - Unit, E2E, and visual regression testing.
go-test
Rules for writing and modifying test files (test.go) in go-crypto-wallet.