why Jasmine is not returning fake data?
Clash Royale CLAN TAG #URR8PPP why Jasmine is not returning fake data? I have a component that calls a service class to do some operation. The service class uses httpClient to call an eternal api. I am trying to test the component as follows : beforeEach(async(() => { TestBed.configureTestingModule({ providers: [SomeService], }).compileComponents(); service = TestBed.get(SomeService); })); fit('should', async () => { fixture.detectChanges(); const fakeHttpPromise = { success: function () { } }; spyOn(service, 'save').and.callFake(function () { return fakeHttpPromise; }); const textbox1 = fixture.debugElement.query(By.css('input[formControlName=control1]')); textbox1.nativeElement.value = 'value'; const textbox2 = fixture.debugElement.query(By.css('input[formControlName=constrol2]')); textbox2.nativeElement.value = 'value'; // here i Create model object using ...