docs: clarify unit test clock rule (#47604)

This commit is contained in:
Mateo Wang 2026-10-20 18:33:01 +00:00 • committed by GitHub
parent e78f7b4602
commit 3f415cb145
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,9 @@
# tests/unit
In-process. No network, clock or subprocess
In-process. No network or subprocess
Unit tests must not depend on the current time or execution speed. Use fixed timestamps for fixtures
and controlled clocks for time-dependent behavior. Incidental clock reads inside production code are allowed
## What good looks like