Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Labels: frontend, testing, Stellar Wave
frontend/src/hooks/useIncomingStreams.ts has no tests, and it holds a fair amount of react-query behavior that we're currently trusting blind.
The bits worth pinning down: incomingStreamsQueryKey, the enabled gating on publicKey, onSuccess invalidating exactly that key, and the mutation throwing "connect your wallet first" when the session is null.
Done when
Where to start
Test file next to useIncomingStreams.ts. Tests for lib/api/_shared.ts are out of scope. Small, self-contained.
Labels:
frontend,testing,Stellar Wavefrontend/src/hooks/useIncomingStreams.tshas no tests, and it holds a fair amount of react-query behavior that we're currently trusting blind.The bits worth pinning down:
incomingStreamsQueryKey, theenabledgating onpublicKey,onSuccessinvalidating exactly that key, and the mutation throwing "connect your wallet first" when the session is null.Done when
publicKeyis null/undefinedincomingStreamsQueryKeyuseWithdrawIncomingStreamrejects when session is null, and invalidatesincomingStreamsQueryKey(publicKey)on successfetchIncomingStreams/withdrawFromStreammocked, with aQueryClientProviderwrapperWhere to start
Test file next to
useIncomingStreams.ts. Tests forlib/api/_shared.tsare out of scope. Small, self-contained.