An issue arises when attempting to bind to 'icon' since it is not recognized as a property of 'fa-icon'.
During the execution of this test within 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 test runner displays the following error message:
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 an 'icon' input, ensure it is part of this module.
- If 'fa-icon' is a Web Component, include 'CUSTOM_ELEMENTS_SCHEMA' in 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. Here is the HTML causing the issue.
https://i.sstatic.net/KHhKd.png
I have attempted to import FontAwesomeModule and FaIcon on the test side and added them to the TestBed configuration's imports statement. I have also made sure that the component side includes the necessary imports. However, none of these attempts have resolved the issue.