You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use <Link> in a render test, you currently get this error:
Uncaught (in promise) TypeError: Cannot read property 'generate' of undefined
at Class.generate (router.js:479)
at RouterService.urlFor (router.js:200)
at LinkComponent.get href [as href] (component.js:78)
at getPossibleMandatoryProxyValue (metal.js:2532)
at get (metal.js:2612)
at glimmer.js:507
at track (metal.js:2498)
at RootPropertyReference.compute (glimmer.js:506)
at RootPropertyReference.value (glimmer.js:374)
at ComponentElementOperations.flush (runtime.js:1584)
This is because RouterService#urlFor delegates to the system's Router#generate method, which expects _routerMicrolib to be initialized, which it is only in application / acceptance tests.
The
<LinkTo>
component is backed by the private-routing
service, which has explicit short-circuit logic to detect when it is being run in an integration / render test.When you use
<Link>
in a render test, you currently get this error:This is because
RouterService#urlFor
delegates to the system'sRouter#generate
method, which expects_routerMicrolib
to be initialized, which it is only in application / acceptance tests./cc @Charizard
The text was updated successfully, but these errors were encountered: