Closed NullVoxPopuli closed 8 months ago
Atm, this test is failing:
@test
'Can pass curried modifier as argument and invoke dynamically (with named args, multi-layer)'() {
const foo = defineSimpleModifier(
(element: Element, _: unknown, { greeting, name }: { greeting: string; name: string }) =>
(element.innerHTML = `${greeting} ${name}`)
);
this.registerComponent('TemplateOnly', 'Foo', '<div {{@value name="Nebula!"}}></div>');
this.registerComponent(
'TemplateOnly',
'Bar',
'<Foo @value={{modifier @value greeting="Hello," name="world!"}}/>'
);
this.render('<Bar @value={{modifier this.foo greeting="Hola,"}}/>', { foo });
this.assertHTML('<div>Hello, Nebula!</div>');
this.assertStableRerender();
}
:see_no_evil:
Paired with @chancancode on this
This bug was found accidentally while trying to figure out a glimmer-repro for: