-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ownerInjection stopped working in tests in 3.11 #18259
Comments
Note: It seems to be working fine in application code, only in tests, with |
@mydea - What kind of tests? |
Can you spin up a demo repo so we can poke at why it might work in app code but not the test? |
In all kinds of tests - acceptance, integration, unit. I am on vacation starting today, I can try to put something together next week, if that helps! |
Ya, sounds great! If others run into this in the meantime, please let us know and spin up a demo repo so we can try to figure out whats going on... @mydea - Hope you have a great vacation! |
Thanks :) So I tried to reproduce it, but it worked with a new repo. Maybe it is linked to engines (which is where I encountered this)? |
Ya, possibly. I was thinking perhaps it only was an issue when using a custom resolver or something. I think we need to slowly ramp up the repro to figure out where the problem is coming from... |
Hmm, I also tried a very basic engine reproduction but it also worked there. Not quite sure what is going on. Basically, |
Fixed by #18780 |
I have a test, with code like this:
Which was working fine in 3.10. However, it stopped working in 3.11, with this error:
Assertion Failed: An EmberObject based class, (unknown), was not instantiated correctly. You may have either used
newinstead of
.create(), or not passed arguments to your call to super in the constructor:
super(...arguments). If you are trying to use
new, consider using native classes without extending from EmberObject.
I am aware that this is not an ideal pattern, and could be better solved by registering the service and looking it up from the owner. But I guess it is still a bug that this just stopped working now?
The text was updated successfully, but these errors were encountered: