If 'cc-sub-header-title' is an Angular component, then verify that it is part of this module

Viewed 65

I'm using Angular 10 version and while running unit testcases facing this error:

If 'cc-sub-header-title' is an Angular component, then verify that it is part of this module. If 'cc-sub-header-title' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'

Actually added 'CUSTOM_ELEMENTS_SCHEMA' to '@NgModule.schemas', but still this error occurs.

My code: Module.ts:

   '@NgModule({
        schemas: [
         CUSTOM_ELEMENTS_SCHEMA,
        ],'

Error:

Chrome Headless 88.0.4298.0 (Windows 10) ERROR: ''cc-sub-header' is not a known element:

  1. If 'cc-sub-header' is an Angular component, then verify that it is part of this module.
  2. If 'cc-sub-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the >'@NgModule.schemas' of this component to suppress this message.' Chrome Headless 88.0.4298.0 (Windows 10): Executed 117 of 190 SUCCESS (0 secs / 2.545 secs) Chrome Headless 88.0.4298.0 (Windows 10): Executed 117 of 190 SUCCESS (0 secs / 2.545 secs) Chrome Headless 88.0.4298.0 (Windows 10) ERROR: ''cc-sub-header' is not a known element: Chrome Headless 88.0.4298.0 (Windows 10) ERROR: ''cc-sub-header-title' is not a known >element:
  3. If 'cc-sub-header-title' is an Angular component, then verify that it is part of this >module.
  4. If 'cc-sub-header-title' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'

Could I get any solution? Thanks in Advance..!!

0 Answers
Related