This is a piece of test code made for the Angular application.
The router object is a mock provided by the RouterTestingModule dependency. I wonder if such a test can be considered a unit test (because it actually tests only one element and the fact that it calls some method - without checking its result), or should it be called an integration test (due to the fact that it still call external dependence)?
it('should trigger the navigation to `/home`', async(() => {
const link = fixture.debugElement.nativeElement.querySelector('.home-link');
link.click();
expect(router.navigateByUrl).toHaveBeenCalled();
}))