fix issue where beforeEach wouldn't wait for dropBitstream to end

This commit is contained in:
Art Lowel
2020-06-29 17:24:00 +02:00
parent 5b82a8a07b
commit e119967325
2 changed files with 10 additions and 10 deletions

View File

@@ -191,15 +191,15 @@ describe('ItemBitstreamsComponent', () => {
}); });
describe('when dropBitstream is called', () => { describe('when dropBitstream is called', () => {
const event = { beforeEach((done) => {
comp.dropBitstream(bundle, {
fromIndex: 0, fromIndex: 0,
toIndex: 50, toIndex: 50,
// tslint:disable-next-line:no-empty // tslint:disable-next-line:no-empty
finish: () => {} finish: () => {
}; done();
}
beforeEach(() => { })
comp.dropBitstream(bundle, event);
}); });
it('should send out a patch for the move operation', () => { it('should send out a patch for the move operation', () => {

View File

@@ -11,7 +11,7 @@ export function getMockRequestService(requestEntry$: Observable<RequestEntry> =
getByUUID: requestEntry$, getByUUID: requestEntry$,
uriEncodeBody: jasmine.createSpy('uriEncodeBody'), uriEncodeBody: jasmine.createSpy('uriEncodeBody'),
isCachedOrPending: false, isCachedOrPending: false,
removeByHrefSubstring: jasmine.createSpy('removeByHrefSubstring').and.returnValue(observableOf(true)), removeByHrefSubstring: observableOf(true),
hasByHrefObservable: observableOf(false) hasByHrefObservable: observableOf(false)
}); });
} }