Skip to content

Any way to convert AnySchedulerOf<RunLoop> back to RunLoop? #41

Answered by mbrandonw
nsoojin asked this question in Q&A
Discussion options

You must be logged in to vote

I think your only option for making that code testable is to design a dependency wrapper so that you can hide the CADisplayLink. Then the live version of the dependency can use CADisplayLink and the mock/test-friendly version can just use a plain timer that works with schedulers.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@nsoojin
Comment options

Comment options

You must be logged in to vote
1 reply
@nsoojin
Comment options

Answer selected by nsoojin
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
Converted from issue

This discussion was converted from issue #40 on September 07, 2021 12:18.