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
The current release of angular component testing does not currently support standalone components. This is a new a promising feature that was recently released in angular 14 that we want to add support for. The good news is that adding support should require just a tiny tweak to the mount api.
The issue is that by default we take the component passed into the mount as the first parameter when provided the class definition ie: cy.mount(MyComopnent) and we pass it to the declarations array of the TestBed. However, in a standalone application, this is no longer valid as it needs to be passed to the imports array instead.
We need to add a check for if a component set to use standalone and if so push the component into the imports array instead of the declarations array.
Why is this needed?
This is needed because having support for standalone components out of the box in angular will go a long way for overall adoption.
Other
We use to have this support but it got squashed out. We need to also add a system test for this so we validate this support moving forward.
The text was updated successfully, but these errors were encountered:
What would you like?
The current release of angular component testing does not currently support standalone components. This is a new a promising feature that was recently released in angular 14 that we want to add support for. The good news is that adding support should require just a tiny tweak to the mount api.
The issue is that by default we take the component passed into the mount as the first parameter when provided the class definition ie: cy.mount(MyComopnent) and we pass it to the
declarations
array of theTestBed
. However, in a standalone application, this is no longer valid as it needs to be passed to theimports
array instead.We need to add a check for if a component set to use standalone and if so push the component into the
imports
array instead of thedeclarations
array.Why is this needed?
This is needed because having support for standalone components out of the box in angular will go a long way for overall adoption.
Other
We use to have this support but it got squashed out. We need to also add a system test for this so we validate this support moving forward.
The text was updated successfully, but these errors were encountered: