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
I've done more investigation after my PR: #88 . I found that even my PR doesn't completely solve this problem, it seems like this is a limitation of our current compiler.
If I understood correctly our glimmerx babel plugin/compiler compiles the components with their scope: and services concatenated:
This is not possible for a render()test-helper function since essentially we are passing down a glimmer templateOnlyComponent. I would appreciate if we could figure out a way to allow this in the glimmerx package or compiler level, so this context can be set directly in the renderComponent API:
returnrenderComponent(hbs` <h1>{{this.someProperty}}</h1> `,{element: document.getElementById('ember-testing'),// thisContext or context or owner(which sets a context if thats what it does)args: argsContextservices: servicesContextAssignedToThisContext});
The text was updated successfully, but these errors were encountered:
izelnakri
changed the title
Required for render() test-helper: currently impossible to set services & this context for templateOnlyComponents
BUG/Requirement: render() test-helper: currently impossible to set services & this context for templateOnlyComponents
Nov 8, 2020
I've done more investigation after my PR: #88 . I found that even my PR doesn't completely solve this problem, it seems like this is a limitation of our current compiler.
If I understood correctly our glimmerx babel plugin/compiler compiles the components with their
scope:
andservices
concatenated:This is not possible for a
render()
test-helper
function since essentially we are passing down a glimmertemplateOnlyComponent
. I would appreciate if we could figure out a way to allow this in theglimmerx
package or compiler level, sothis
context can be set directly in therenderComponent
API:The text was updated successfully, but these errors were encountered: