I'm creating starter kit template with auth and a example with CRUD (https://github.com/fransyozef/basic-login-angular)
Now I'm new with unit testing and i'm trying to get atleast get the testing running that the components are created. But I'm getting stuck with
TypeError: Cannot read property 'subscribe' of undefined
I think the error comes from
resolveRoute() {
this.route.params.subscribe(params => {
if (params['id']) {
this.id = +params['id'];
this.getItem();
} else {
this.handleItemNotFound();
}
});
}
in the file https://github.com/fransyozef/basic-login-angular/blob/master/src/app/items/item-edit/item-edit.component.ts
Right now I have the testfile : https://github.com/fransyozef/basic-login-angular/blob/master/src/app/items/item-edit/item-edit.component.spec.ts
Can somebody give me a hand with this?