Angular 16 | Transform Input Values
Closed this issue · 3 comments
As described in article a new helpful feature has been introduced in Angular v16.1.0 to provide an alternative and easy way to transform input values.
It seems that the corresponding transformation function is not executed having a setup using spectator
. I would expect that the function is executed though.
and without Spectator it works?
To be honest, I did not try it yet. But I will do it and come back to you.
But in general, wouldn’t you expect that it should work?
It does not work with the native Angular testing setup either. To be more precise, it does not work creating the component under test directly. The transformation function is only executed having a host component in place.
With spectator it does work using createHostFactory
instead of createComponentFactory
as well. Therefore, this issue can be considered as resolved.
To be honest, I did not expect this behaviour, but apparently that's how it currently works. In the end it is at least a lesson learned.