I'm diving into the world of angular unit testing and looking to set up my first successful test. Here's what I've come up with:
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AppComponent ],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('first test', () => {
expect('1').toBe('1');
});
});
As you can see, my initial test is a simple assertion that "1" equals "1". However, I'm encountering an error that says:
Error: Template parse errors: Can't bind to 'min' since it isn't a known property of 'dx-progress-bar'.
1. If 'dx-progress-bar' is an Angular component and it has 'min' input, then verify that it is part of this module.
2. If 'dx-progress-bar' 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. ("
width="100%"
[class.complete]="progressBar.value == maxValue"
[ERROR ->][min]="0"
[max]="maxValue"
[statusFormat]="wordProgression" "): ng:///DynamicTestModule/AppComponent.html@15:4
Although I am using DevExtreme widgets in my app component, I haven't attempted to test them yet. I'm focusing on basic test cases for now.
Any suggestions on how I should go about fixing this issue?
Open to Suggestions!