Files
TUIkit/Tests/TUIkitTests
phranck 5975820ed4 Test: Fix flaky state tests by eliminating global RenderNotifier mutation
AppStateTests: Tests AppState as isolated instances without touching
RenderNotifier.current. Removed .serialized (no shared state).

StateStorageIdentityTests: Replaced testEnvironment() with testStorage()
that only creates a StateStorage. No longer sets RenderNotifier.current.
StateBox.didSet harmlessly calls setNeedsRender() on the default global.

StatePropertyTests: The one test that needs RenderNotifier.current
(stateTriggerRender) now swaps it atomically — set, mutate, check,
restore in a single synchronous sequence with no yield points.

Root cause: All three suites ran .serialized internally but parallel
to each other. Since RenderNotifier.current is a process-global static
variable, concurrent writes caused one suite to overwrite another's
AppState, making needsRender checks fail intermittently.
2026-02-03 13:45:08 +01:00
..