[DURACOM-151] unit test fix

This commit is contained in:
Alisa Ismailati
2023-06-06 15:35:54 +02:00
parent 3611f37563
commit 1b2d9829ed

View File

@@ -627,11 +627,8 @@ describe('RequestService', () => {
it('should return an Observable that emits true as soon as the request is stale', fakeAsync(() => {
dispatchSpy.and.callFake(() => { /* empty */ }); // don't actually set as stale
getByUUIDSpy.and.returnValue(cold('a-b--c--d-', { // but fake the state in the cache
a: { state: RequestEntryState.ResponsePending },
b: { state: RequestEntryState.Success },
c: { state: RequestEntryState.SuccessStale },
d: { state: RequestEntryState.Error },
getByUUIDSpy.and.returnValue(cold('-----(a|)', { // but fake the state in the cache
a: { state: RequestEntryState.SuccessStale },
}));
const done$ = service.setStaleByUUID('something');