This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/cursor/rules/golang-testing.mdc
T
2026-07-26 11:45:12 +02:00

13 lines
367 B
Plaintext

---
alwaysApply: false
---
# Testing Rules
- Write tests for all exported functions.
- Use `*_test.go` files with `testing` package.
- Test names must describe the behavior: `TestFunctionName_Scenario`.
- Use table-driven tests for multiple cases.
- Ensure test coverage > 80%.
- Use `t.Helper()` in test helpers.
- Benchmarks must be named `BenchmarkFunctionName`.