Blog

Angular articles

Resolving CUSTOM_ELEMENTS_SCHEMA error with unit testing Angular 7 components

Resolving CUSTOM_ELEMENTS_SCHEMA error with unit testing Angular 7 components

Posted: Thursday 21st March, 2019 - 9:09pm
Author: James Griffiths

Created custom components with your Angular 6/7 applications and finding your unit tests failing with the following error(s):

'mi-accordion' is not a known element:
1. If 'mi-accordion' is an Angular component, then verify that it is part of this module.
2. If 'mi-accordion' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component

Here's how to fix that...

Read more...
Top