我正在将 Clarity 和 Angular 用于应用程序,并且正在尝试向其添加测试。但是每当我尝试运行测试时,我都会收到此错误:
Can't bind to 'clr-nav-level' since it isn't a known property of 'div'
我是否必须从 Clarity 库中导入任何其他内容才能完成这项工作?
这是我的 spec.ts 代码:
describe('AppComponent', () => {
let appComponent: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
ClarityModule,
RouterTestingModule,
BrowserAnimationsModule
],
declarations: [
AppComponent,
NavbarComponent
]
}).compileComponents();
fixture = TestBed.createComponent(AppComponent);
appComponent = fixture.debugElement.componentInstance;
}));
it('should create the app', async(() => {
expect(appComponent).toBeTruthy();
}));
});