Replies: 1 comment
-
Hey @saroar 👋 It looks like your requestWhenInUseAuthorization: { _ in
.fireAndForget {
locationManagerSubject.send(.didUpdateLocations([mockLocation]))
}
} I think it would help asserting that this is the case, or instead removing this logic and sending location update later on, as you already seem to be doing later on in your test case with |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
here how do I test this case ?
https://github.com/AddaMeSPB/AddaMeIOS/blob/feature/git_workflow/AddameSPM/Sources/EventView/EventsReducer.swift#L103
1st: warning from onApper
2nd warning: have 3 warning:
An effect returned for this action is still running. It must complete before the end of the test. …
To fix, inspect any effects the reducer returns for this action and ensure that all of them complete by the end of the test. There are a few reasons why an effect may not have completed:
• If an effect uses a scheduler (via "receive(on:)", "delay", "debounce", etc.), make sure that you wait enough time for the scheduler to perform the effect. If you are using a test scheduler, advance the scheduler so that the effects may complete, or consider using an immediate scheduler to immediately perform the effect instead.
• If you are returning a long-living effect (timers, notifications, subjects, etc.), then make sure those effects are torn down by marking the effect ".cancellable" and returning a corresponding cancellation effect ("Effect.cancel") from another action, or, if your effect is driven by a Combine subject, send it a completion.
Must handle 1 received action before sending an action: …
Unhandled actions: [
[0]: EventsAction.locationManager(
LocationManager.Action.didUpdateLocations(
[
[0]: Location(rawValue: CLLocation())
]
)
)
]
I am using this package kit now https://github.com/pointfreeco/composable-core-location
Beta Was this translation helpful? Give feedback.
All reactions