Initial commit
This commit is contained in:
commit
97fcc33283
50 files changed
+3211
No files matched your search
@@ -0,0 +1,17 @@
|
||||
---
|
||||
description: Testing standards — structure, naming, and what to cover
|
||||
globs: **/*.{test,spec}.{ts,tsx,js,jsx,py}
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Testing Standards
|
||||
|
||||
- Test behavior, not implementation details. Assert outputs and side effects users care about.
|
||||
- Follow Arrange–Act–Assert (or Given–When–Then) structure.
|
||||
- One assertion concept per test. Name tests: `should <expected> when <condition>`.
|
||||
- Cover happy path, edge cases, and at least one failure case per feature.
|
||||
- Mock external services (APIs, DB, email) — never call real third parties in unit tests.
|
||||
- Do not test framework internals or trivial getters with no logic.
|
||||
- Keep tests independent: no shared mutable state between tests.
|
||||
- Prefer factory helpers or fixtures over copy-pasted setup blocks.
|
||||
- Flaky tests are bugs — fix or delete them, do not `@skip` without a tracked issue.
|
||||
Reference in new issue
Block a user