-
Notifications
You must be signed in to change notification settings - Fork 42
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
TypeError: Cannot read property 'generate' of undefined #94
Comments
This is happening to us as well, dropping to 1.14 resolved it |
@mazondo what version of ember are you using? |
I just bumped into this in my unit tests (works fine in the app). Essentially I have a component rendering a handful of links using Ember-2.9.1 Just noticed that @mazondo downgraded ember-href-to-1.14; I'll try that. |
So downgrading to ember-href-to-1.14.0 worked for me too. Thanks @mazondo |
Errors exist in Ember-2.16.2 as well. |
I was seeing this on 1.15.x with [email protected]. Looking into this some it looks like the router isn't setup yet, that's why
Reference: |
Looking around some more, it looks like the integration test is setting up the router with: beforeEach() {
getOwner(this).lookup('router:main').setupRouter();
} @GavinJoyce Is there a way to automatically setup the router without needing to manually add a beforeEach to every integration test? |
@GCheung55 Adding this did fix this particular issue but it broke lot's of other tests. Looks like this call has side-effects that impact other tests. |
@panthony I see. My project has a couple of components that use We’re the side-effect errors you saw consistent? |
@GCheung55 Typically I have: In integration tests:
In route tests:
If I add
Maybe this is due to I did not try to fix them really. I do not wish to add something in a test that break another one, |
+1 just ran into this when using |
Just in case this data point is helpful... I'm using Ember 3.3.1 and both 1.14.0 and 1.15.1 cause the error. |
seems like |
Ember 2.9.0
Running ember test with ember-href-to v1.14.0 is fine.
Using v1.15.0 we get some failing integration tests:
The test renders a component that contains a href-to call:
I haven't manage to recreate it in tests on ember-href-to yet
The text was updated successfully, but these errors were encountered: