Skip to content
Discussion options

You must be logged in to vote

Ok,

I went deep reading the source code to understand what's going on.

First, there was documentation for my problem in https://hmlongco.github.io/Factory/documentation/factorykit/modifiers

When I define an onTest modifier in a Factory Definition with closure A. Even though later I would register a new onTest for the same factory with closure B. When resolving the factory closure A will be executed as explained by the lines:

Second is that when we resolved myService we called Container.shared.myService again, which built a new Factory, which defined a > scope, and which once more defined onTest.

And so Factory went with its most recent definition.

Later in the same document it mentions

C…

Replies: 1 comment

Comment options

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