TypeError: hostRef.$hostElement$.attachInternals is not a function

I’m getting an error TypeError: hostRef.$hostElement$.attachInternals is not a function from ix-input when I’m running jest tests.

Bellow is my usage right now:

<ix-input #runAs type="text" [formControl]="runAsControl" placeholder="Z0000000" value="{{ preferences.runAs }}" />

The error:

If change from ‘ix-input’ to simply ‘input’, everything works and the test passes without any warnings.

You have to apply a pollyfill if your testing enviroment does not support latest browser api.

More insights here: All input components throw error in tests · Issue #1612 · siemens/ix · GitHub