Skip to content

Does providing testValue mean you don't need to explicitly override dependency in tests? #93

Answered by tgrapperon
Muhammed9991 asked this question in Q&A
Discussion options

You must be logged in to vote

This is a gotcha: you need to define all the requirements in the same module in your case. You can conform to TestDependencyKey and then later to DependencyKey in a parent module, but once you conform to DependencyKey, all the values are set and the ones that you declared in the tests are not considered as fulfillments of the protocol.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Muhammed9991
Comment options

@tgrapperon
Comment options

Answer selected by Muhammed9991
@Muhammed9991
Comment options

@tgrapperon
Comment options

@yan-zaitsev-hs
Comment options

@Muhammed9991
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants