Can't bind to 'icon' since it isn't a known property of 'fa-icon'.
When trying to run this test in people.component.spec.ts
import { async, ComponentFixture, TestBed } from "@angular/core/testing";
import { PeopleComponent } from "./people.component";
describe("PeopleComponent Unit Test", () => {
let component: PeopleComponent;
let fixture: ComponentFixture<PeopleComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PeopleComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PeopleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it("should create", () => {
expect(component).toBeTruthy();
});
;
})
The runner shows this error:
Failed: Template parse errors: Can't bind to 'icon' since it isn't a known property of 'fa-icon'.
- If 'fa-icon' is an Angular component and it has 'icon' input, then
verify that it is part of this module. - If 'fa-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
- To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. This is the HTML causing the issue.
I've tried to import FontAwesomeModule and FaIcon on test side and add to TestBed configuration's imports statement. I've tried to ensure the component side has the imports too. Nothing seems to work.