Skip to content

How to use LazyImageView/LazyImage in a testable way #622

Answered by kean
nikita-bor asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Completely controlling LazyImageView/LazyImage

There is a way to change the pipeline on a per-view basic. For mocking it completely, I suggest creating a protocol, rolling out your custom mock, and using a factory method to create the views.

But this overwrite triggers swift concurrency warning,

This is now fixed in Nuke 11.5.1. Yes, the setter is designed to be public. But previously it only really supported one scenario: setting the pipeline on app launch and never touching it again.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nikita-bor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants