For the purpose of testing my component, I wrote the following code snippet:
describe('Component: TestComponent', () => {
let component: TestComponent;
let fixture: ComponentFixture<TestComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [TestComponent]
});
fixture = TestBed.createComponent(TestComponent);
component = fixture.componentInstance;
});
});
Upon running ng test
, an error is displayed as follows:
Failed: Template parse errors:
'mat-checkbox' is not a known element...
I have verified my module.ts file and it seems to be correct. Additionally, I added the necessary import statement:
import {MatCheckboxModule} from '@angular/material/checkbox';
Despite all this, the error persists. Can anyone identify the issue in my code?