Unit tests: Can't bind to 'ngModel' since it isn't a known property of 'ui-switch'
lewtur opened this issue · comments
Lewis commented
I've managed to use the module successfully, but now i'm trying to make it pass our unit tests, and it fails with the error Can't bind to 'ngModel' since it isn't a known property of 'ui-switch'
.
Here is my test component
import { UiSwitchModule } from 'angular2-ui-switch';
describe('HubPreviewComponent', () => {
let component: HubPreviewComponent;
let fixture: ComponentFixture<HubPreviewComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [HubPreviewComponent, OfferPreviewComponent],
imports: [ReactiveFormsModule, UiSwitchModule],
providers: [ ... ]
}).compileComponents();
}));
I've also tried using import { UiSwitchModule } from '../../../node_modules/angular2-ui-switch/src';
as a previous post suggested.