You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use Mocker in combination with SwiftUI and Snapshot testing.
I'm using Xcode assets symbol generation to get my images from the asset catalogue: Image(.myLogo)
When I snapshot a SwiftUI view thats uses this image, all goes well, but when I use Mocker to mock some other requests in some other tests. The resulted snapshot shows me a cross instead of the image:
And my error log tells me:
🚨 No mocked data found for url Optional("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABtUAAAEKCAYAAABt6tqOAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAG1aADAAQAAAABAAABCgAAAADIQdNhAABAAElEQVR4Ae3d7XXbSLYoUGtW/5deBOJE ...... ABJRU5ErkJggg==") method Optional("GET"). Did you forget to use `register()`? 🚨
Setting the mode to opt-in fixes this:
Mocker.mode = .optin
But shouldn't be necessary. Did somebody see this before?
The text was updated successfully, but these errors were encountered:
I'm trying to use Mocker in combination with SwiftUI and Snapshot testing.
I'm using Xcode assets symbol generation to get my images from the asset catalogue:
Image(.myLogo)
When I snapshot a SwiftUI view thats uses this image, all goes well, but when I use
Mocker
to mock some other requests in some other tests. The resulted snapshot shows me a cross instead of the image:And my error log tells me:
Setting the mode to opt-in fixes this:
Mocker.mode = .optin
But shouldn't be necessary. Did somebody see this before?
The text was updated successfully, but these errors were encountered: