Replies: 1 comment 1 reply
-
|
I'd introduce a local variable |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey good people!
I have a
Reducerthat starts a long running effect when the view appears (with SwiftUI's .task modifier)The rationale behind all that is that I want to fetch an initial batch of data, but also to subscribe to notifications from
objCreatedAsyncStreamand when an event is emitted, refresh the data.I was able to test the initial fetching of data using
TestStorebut when I try to test the long running effect I'm facing issues. I want to return an empty array of objs fromeffAand onceobjCreatedAsyncStreamemits an event, return an array with some objects.I thought that I could swap the dependency that fetches the data during the test, but it seems that swapping a dependency with a long running effect, is not supported.
Any ideas on how to approach this?
Beta Was this translation helpful? Give feedback.
All reactions