mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-17 16:49:04 +00:00
Testing: Document subtest blank-line convention
This commit is contained in:
parent
80ac70cc6a
commit
85c59b1468
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
## Go Testing Patterns
|
||||
|
||||
- Tests live next to sources (`<file>_test.go`); group cases with `t.Run(...)` using **PascalCase** names (`Success`, `InvalidRequest`).
|
||||
- Tests live next to sources (`<file>_test.go`); group cases with `t.Run(...)` using **PascalCase** names (`Success`, `InvalidRequest`). Consecutive subtests inside the same `Test*` function are written without blank lines between them so the cases read as a compact table; reserve blank lines for separating distinct setup blocks.
|
||||
- Do not run multiple test commands in parallel — suites share fixtures, temp assets, and DB state.
|
||||
- Keep Go scratch work inside `internal/...` (Go refuses `internal/` imports from `/tmp`).
|
||||
- Prefer focused runs: `go test ./internal/<pkg> -run <Name> -count=1`. Avoid `./...` unless needed; heavy packages (`internal/entity`, `internal/photoprism`) take 30–120s on first run.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue