diff --git a/src/app/core/data/comcol-data.service.spec.ts b/src/app/core/data/comcol-data.service.spec.ts index f734d15c86..c18aff184e 100644 --- a/src/app/core/data/comcol-data.service.spec.ts +++ b/src/app/core/data/comcol-data.service.spec.ts @@ -21,6 +21,7 @@ import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; import { BitstreamDataService } from './bitstream-data.service'; +import { take } from 'rxjs/operators'; const LINK_NAME = 'test'; @@ -162,12 +163,11 @@ describe('ComColDataService', () => { }); describe('if the scope Community can\'t be found', () => { - it('should throw an error', (done) => { - const result = service.getBrowseEndpoint(options); + it('should throw an error', () => { + const result = service.getBrowseEndpoint(options).pipe(take(1)); const expected = cold('--#-', undefined, new Error(`The Community with scope ${scopeID} couldn't be retrieved`)); expect(result).toBeObservable(expected); - done(); }); });