ioc.fake must come before any use()
?
#1750
-
In many of my modules I've opted to use In my tests, I'm trying to use What am I doing wrong here? Secondly, in the docs there are many examples of registering dependencies with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yup, you are spot on with this. The With v5 we are using proxies to fix this behaviour and works like a charm, but back porting it lead to breaking changes. Regarding, where to use
|
Beta Was this translation helpful? Give feedback.
Yup, you are spot on with this. The
fake
method is not really that helpful with v4 (we have fixed it in v5 though). Once has module has been imported (ie theuse
method has been used), the fake cannot undo its imported value.With v5 we are using proxies to fix this behaviour and works like a charm, but back porting it lead to breaking changes.
Regarding, where to use
ioc.bind
? The answer is "It depends"