Skip to content

"ng test" returns errors even after adding "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas'  #4700

@darrenbrett

Description

@darrenbrett

Development Environment:
@angular/cli: 1.0.0-beta.30
node: 7.4.0
Chrome 56.0.2924 (Mac OS X 10.11.6)

After creating a few tests, when I run "ng test" I get errors like this one:

  1. If 'app-search-field' is an Angular component, then verify that it is part of this module.
  2. If 'app-search-field' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("

    [ERROR ->]

    "): AppComponent@6:8

My understanding is that this has to do with the naming of selector tags.

So, following the instructions in the error above, as well as what I found online, I added "CUSTOM_ELEMENTS_SCHEMA" to both my root module, and all other modules. But I am still getting the same errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions