Open vladbushev opened 4 years ago
I want check what if method service.create runed then method storeService.setType run with null. I have method service.create he return service.createItem$. service.createItem$ return apiService.create$ In unit
service.create
service.createItem$
apiService.create$
when(apiService.create$(TestDataFactory.createData('AAA'))) .thenReturn(of(TestDataFactory.createData('AAA'))); when(service.createItem$(TestDataFactory.createData('AAA'))) .thenReturn(of(TestDataFactory.createData('AAA')));
it('should create', fakeAsync(() => { service.create(TestDataFactory.createData('AAA')); expect(storeService.setType).toHaveBeenCalledWith(null); }));
Can you provide full example? I cant figure out what are you trying to do...
I want check what if method service.create runed then method storeService.setType run with null. I have method
service.create
he returnservice.createItem$
.service.createItem$
returnapiService.create$
In unit