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
henriquecustodia
changed the title
MockComponents set Signal Inputs as Decorator Inputs
MockComponent function set Signal Inputs as Decorator Inputs
May 3, 2024
I've noticed that Signal Inputs are just treated as Decorator Input.
I have the following component:
I mock the component using MockComponent function:
And my test try to access the Singal Input from
ListItemComponent
to assert its value:But the test breaks because the
task
property (it's a Signal Input) is not a function.The complete error:
TypeError: completedItemDebugEl.componentInstance.task is not a function
Logging the
<ListItemComponent>item.componentInstance).task
in the test, I see that it's a propertytask: { id: '1', name: 'Buy milk', completed: true }
Working with Signal Inputs, we need to test it as a Signal and not as a property as it was with Decorator Inputs.
Any news about that @satanTime?
Thank for your amazing work btw
The text was updated successfully, but these errors were encountered: