@@ -217,7 +217,7 @@ describe('Favorite action execute tests', () => {
217217
218218 // Check node change propagation
219219 expect ( file . attributes . favorite ) . toBe ( 1 )
220- expect ( eventBus . emit ) . toBeCalledTimes ( 1 )
220+ expect ( eventBus . emit ) . toHaveBeenCalled ( )
221221 expect ( eventBus . emit ) . toBeCalledWith ( 'files:favorites:added' , file )
222222 } )
223223
@@ -251,7 +251,7 @@ describe('Favorite action execute tests', () => {
251251
252252 // Check node change propagation
253253 expect ( file . attributes . favorite ) . toBe ( 0 )
254- expect ( eventBus . emit ) . toBeCalledTimes ( 1 )
254+ expect ( eventBus . emit ) . toHaveBeenCalled ( )
255255 expect ( eventBus . emit ) . toBeCalledWith ( 'files:favorites:removed' , file )
256256 } )
257257
@@ -285,9 +285,9 @@ describe('Favorite action execute tests', () => {
285285
286286 // Check node change propagation
287287 expect ( file . attributes . favorite ) . toBe ( 0 )
288- expect ( eventBus . emit ) . toBeCalledTimes ( 2 )
289- expect ( eventBus . emit ) . toHaveBeenNthCalledWith ( 1 , 'files:node:deleted' , file )
290- expect ( eventBus . emit ) . toHaveBeenNthCalledWith ( 2 , 'files:favorites:removed' , file )
288+ expect ( eventBus . emit ) . toHaveBeenCalled ( )
289+ expect ( eventBus . emit ) . toHaveBeenCalledWith ( 'files:node:deleted' , file )
290+ expect ( eventBus . emit ) . toHaveBeenCalledWith ( 'files:favorites:removed' , file )
291291 } )
292292
293293 test ( 'Favorite does NOT triggers node removal if favorite view but NOT root dir' , async ( ) => {
@@ -320,7 +320,7 @@ describe('Favorite action execute tests', () => {
320320
321321 // Check node change propagation
322322 expect ( file . attributes . favorite ) . toBe ( 0 )
323- expect ( eventBus . emit ) . toBeCalledTimes ( 1 )
323+ expect ( eventBus . emit ) . toHaveBeenCalled ( )
324324 expect ( eventBus . emit ) . toBeCalledWith ( 'files:favorites:removed' , file )
325325 } )
326326
0 commit comments