test: cover user-provider reconnect-resync branch #106
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #101 (commit
e52f069f, #66) added reconnect-resync to apps/client/src/features/user/user-provider.tsx: afirstConnectflag so that only on a socket reconnect it invalidates theroot-sidebar-pagesandsidebar-pagesquery keys (first connect must NOT invalidate).Gap: untested; the project has no socket/provider test harness yet.
Needed: if a fake-socket/provider harness is feasible (Vitest, like the provider tests added in this PR), mount
UserProviderwith a stubbed socket + queryClient, emitconnecttwice, and assertinvalidateQueriesfires only on the second connect, for both keys.Found in code review of PR #101.
Ghost referenced this issue2026-06-21 14:10:29 +03:00