angular - Jasmine test for simple Angular2 component not working -
i have simple component: @component({ selector: 'messages', styleurls: ['messages.component.scss'], templateurl: 'messages.component.html', }) export class messagescomponent implements oninit { constructor(private dataservice: dataservice) {} public getone(): number{ return 1; } } i'm trying run test can't work please help: describe('component: messagescomponent', () => { let component: messagescomponent; beforeeach(() => { testbed.configuretestingmodule({ declarations: [messagescomponent], }).compilecomponents(); const fixture = testbed.createcomponent(messagescomponent); component = fixture.componentinstance; }); it('should have defined component', () => { expect(true).tobetruthy(); }); }); (i'm using webpack if relevant) this error get: error: test module uses component messagescomponent using ...