mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
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.