I am running unit test for angular app, I want to unit test if navigation is working correctly in angular app.
if (this.customer.length == 0) {
this.router.navigate(['/nocustomer']);
}
And the unit test for this
it(`should navigate to nocustomer`,()=>{
component.customers.length=0;
//what must be written here to check this
})