-
-
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
Re-registration by initializers on App.reset
#12231
Comments
I agree. |
app instances and app.reset are two different things.
In a world of modules the namespace doesn't need to be perserved. The ––– If you are trying to make tests faster, fixing the It is also important that our SSR use-cases, and general app testing are as close as possible. So having testing use the same path, will be net positive. |
I believe that the acceptance test helpers in ember-testing will need some significant work to make compatible with living on aka, what Stef said 😺 |
That being said This may have been a regression, @dgeb anything come to mind? |
@stefanpenner - I have a fix for that bit (basically we need to not be using initializers internally for this) incoming. |
@rwjblue 👍 |
Thanks for the clarification everyone. I'm glad this issue is getting addressed, but will look into the @rwjblue do you have any thoughts on how to refactor the test helpers to support using instances? I took a look, and they seem fairly bound to the application itself. I'd be more than happy to pursue whatever work needs to be done to get them working. |
@trentmwillis sorry for the upfront confusion, i hope my explanation made sense. I can gladly provide more context if you are interested. I would love to see all our efforts aligned |
While looking into using
App.reset()
for acceptance tests, I stumbled onto this error:It seems the root cause is if you use the routing service (e.g., in a
link-to
) it gets cached in the application registry and then when you restart, it is picked up by the initializer running again and throws the error. I worked around that particular instance only to have a similar issue crop up with registration of transforms by Ember Data.I'm wondering if re-running initializers should be part of resetting an application. I feel like semantically, only instance initializer should be re-ran. Thoughts? It seems like we could get some faster test times without having to completely recreate the application each time, but this blocks us from being able to use new instances right now.
Here's a super simple repro case: JSBin
The text was updated successfully, but these errors were encountered: