post performance improvement test fixes

This commit is contained in:
Kristof De Langhe
2019-10-29 13:14:07 +01:00
parent e26961322f
commit ca38af3772
2 changed files with 3 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ describe('HALEndpointService', () => {
.returnValue(hot('a-', { a: 'https://rest.api/test' })); .returnValue(hot('a-', { a: 'https://rest.api/test' }));
const result = service.getEndpoint(linkPath); const result = service.getEndpoint(linkPath);
const expected = cold('b-', { b: endpointMap.test }); const expected = cold('(b|)', { b: endpointMap.test });
expect(result).toBeObservable(expected); expect(result).toBeObservable(expected);
}); });
@@ -97,7 +97,7 @@ describe('HALEndpointService', () => {
spyOn(service as any, 'getEndpointAt').and spyOn(service as any, 'getEndpointAt').and
.returnValue(hot('a-', { a: undefined })); .returnValue(hot('a-', { a: undefined }));
const result = service.getEndpoint('unknown'); const result = service.getEndpoint('unknown');
const expected = cold('b-', { b: undefined }); const expected = cold('(b|)', { b: undefined });
expect(result).toBeObservable(expected); expect(result).toBeObservable(expected);
}); });
}); });

View File

@@ -9,6 +9,7 @@ export function getMockRequestService(requestEntry$: Observable<RequestEntry> =
getByHref: requestEntry$, getByHref: requestEntry$,
getByUUID: requestEntry$, getByUUID: requestEntry$,
uriEncodeBody: jasmine.createSpy('uriEncodeBody'), uriEncodeBody: jasmine.createSpy('uriEncodeBody'),
isCachedOrPending: false,
/* tslint:disable:no-empty */ /* tslint:disable:no-empty */
removeByHrefSubstring: () => {} removeByHrefSubstring: () => {}
/* tslint:enable:no-empty */ /* tslint:enable:no-empty */