title: Angular test error: Cannot read property 'subscribe' of undefined at new RouterLinkWithHref
body: <p>I don't get what I'm doing wrong, I didn't find any link of <strong>RouterLinkWithHref</strong> to any error in tests, furthermore I'm not using RouterLinkWithHref anywhere, as far as I know :/</p>
  
  <p>Can anyone help me with this:</p>
  
  <pre><code>fdescribe('AddItemComponent: ', () =&gt; {
    let cmp: AddItemComponent;
    let fixture: ComponentFixture&lt;AddItemComponent&gt;;
    let de: DebugElement;
    let el: HTMLElement;
  
    const mockRouter = {
      navigate: jasmine.createSpy('navigate')
    };
    const mockCustomCardService = {
      getItemDeliveryDate: () =&gt; Observable.empty(),
      emitItemChanges: () =&gt; Observable.empty(),
    };
    const mockActivatedRoute = { snapshot: {} };
    const mockPageDataService = {};
    const mockUserService = {};
  
    beforeEach(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [AddItemComponent],
        imports: [FormsModule, ReactiveFormsModule, SharedModule, TranslateModule.forRoot(), RouterTestingModule],
        providers: [
          SpinningService,
          FormBuilder,
          TranslateService,
          { provide: Router, useValue: mockRouter },
          { provide: CustomItemService, useValue: mockCustomItemService },
          { provide: PageDataService, useValue: mockPageDataService },
          { provide: UserService, useValue: mockUserService },
          { provide: ActivatedRoute, useValue: mockActivatedRoute }
        ],
        schemas: [NO_ERRORS_SCHEMA]
      });
  
      fixture = TestBed.createComponent(AddItemComponent);
      cmp = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    it('Simple test', () =&gt; {
      expect(true).toBeTruthy();
    });
  
  });
  </code></pre>