-
-
Notifications
You must be signed in to change notification settings - Fork 153
[Usage question] Using GetIt.I.get()
in integration test
#265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@escamoteur any ideas on this? |
Your app init function is not awaited if I understand it correctly.
Am 24. März 2022, 16:32 +0100 schrieb CaptainDario ***@***.***>:
… @escamoteur any ideas on this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Oh wow, Now I feel so stupid for asking this. Thank you so much! |
No worries, I was there before myself
Am 24. März 2022, 17:27 +0100 schrieb CaptainDario ***@***.***>:
… > Your app init function is not awaited if I understand it correctly. Am 24. März 2022, 16:32 +0100 schrieb CaptainDario @.>:
> …
> @escamoteur any ideas on this? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>
Oh wow, Now I feel so stupid for asking this.
This literally kept me busy for days.
Thank you so much!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
I am trying to use GetIt in my integration test but I am having some difficulties.
When trying to access registered singletons in
GetIt
, I am always facing this error:I have a function to register my singletons:
This function is called when creating my app instance. However, when I call my function, the singletons are not registered in GetIt and the above Exception is thrown. My code looks like this:
In the README integration tests are mentioned, therefore I assume that it should be possible to access GetIt in them. This leads me to the question what am I doing wrong?
The text was updated successfully, but these errors were encountered: