Número de lecturas: 322

Tuve este error al realizar pruebas unitarias luego de implementar este componente.

1. If 'virtual-scroller' is an Angular component and it has 'items' input, then verify that it is part of this module.
2. If 'virtual-scroller' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

Para corregir este problema realice este cambio.

import { NO_ERRORS_SCHEMA } from "@angular/core";

y luego esto:

beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ yourcomponent ],
      schemas: [NO_ERRORS_SCHEMA]
    })
    .compileComponents();
  }));

Fuente:
https://stackoverflow.com/a/54133718/2400373

Be Sociable, Share!