@@ -93,7 +93,7 @@ describe('FileWorkerService', () => {
9393
9494 it ( 'should emit "explore" and parameters to the worker' , ( ) => {
9595 fileWorkerService . startScan ( stream$ , params ) ;
96- expect ( messageChannelPort1Mock ) . toBeCalledWith ( {
96+ expect ( messageChannelPort1Mock ) . toHaveBeenCalledWith ( {
9797 type : EVENTS . explore ,
9898 value : { path : params . path } ,
9999 } ) ;
@@ -159,7 +159,7 @@ describe('FileWorkerService', () => {
159159 } ,
160160 } as WorkerMessage ) ;
161161
162- expect ( messageChannelPort1Mock ) . toBeCalledWith ( {
162+ expect ( messageChannelPort1Mock ) . toHaveBeenCalledWith ( {
163163 type : EVENTS . explore ,
164164 value : { path : val [ 0 ] } ,
165165 } ) ;
@@ -210,15 +210,15 @@ describe('FileWorkerService', () => {
210210 fileWorkerService . startScan ( stream$ , params ) ;
211211 workerEmitter . emit ( 'error' ) ;
212212 expect ( searchStatus . workerStatus ) . toBe ( 'dead' ) ;
213- } ) . toThrowError ( ) ;
213+ } ) . toThrow ( ) ;
214214 } ) ;
215215
216216 it ( 'should register worker exit on "exit"' , ( ) => {
217217 fileWorkerService . startScan ( stream$ , params ) ;
218218
219219 logger . info . mockReset ( ) ;
220220 workerEmitter . emit ( 'exit' ) ;
221- expect ( logger . info ) . toBeCalledTimes ( 1 ) ;
221+ expect ( logger . info ) . toHaveBeenCalledTimes ( 1 ) ;
222222 } ) ;
223223 } ) ;
224224} ) ;
@@ -240,7 +240,7 @@ describe('FileWorkerService', () => {
240240// mockRandom(randomNumber);
241241
242242// fileWorkerService.getSize(stream$, path);
243- // expect(workerPostMessageMock).toBeCalledWith ({
243+ // expect(workerPostMessageMock).toHaveBeenCalledWith ({
244244// type: 'start-getSize',
245245// value: { path: path, id: randomNumber },
246246// });
0 commit comments