@@ -284,6 +284,9 @@ describe('SlickRowDetailView', () => {
284284 const onBeforeRowSpy = jest . spyOn ( gridOptionsMock . rowDetailView as RowDetailView , 'onBeforeRowDetailToggle' ) ;
285285 const onRowOutViewSpy = jest . spyOn ( gridOptionsMock . rowDetailView as RowDetailView , 'onRowOutOfViewportRange' ) ;
286286 const onRowBackViewSpy = jest . spyOn ( gridOptionsMock . rowDetailView as RowDetailView , 'onRowBackToViewportRange' ) ;
287+ const appendSpy = jest
288+ . spyOn ( angularUtilServiceStub , 'createAngularComponentAppendToDom' )
289+ . mockReturnValue ( { componentRef : { instance : jest . fn ( ) } } as any ) ;
287290
288291 plugin . init ( gridStub ) ;
289292 plugin . onAfterRowDetailToggle = new SlickEvent ( ) ;
@@ -295,6 +298,7 @@ describe('SlickRowDetailView', () => {
295298 // { notify: expect.anything(), subscribe: expect.anything(), unsubscribe: expect.anything(), },
296299 // expect.anything()
297300 // );
301+ expect ( appendSpy ) . toHaveBeenCalled ( ) ;
298302 expect ( onAsyncRespSpy ) . not . toHaveBeenCalled ( ) ;
299303 expect ( onAsyncEndSpy ) . not . toHaveBeenCalled ( ) ;
300304 expect ( onAfterRowSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , { item : columnsMock [ 0 ] , expandedRows : [ 0 ] , grid : gridStub } ) ;
@@ -406,7 +410,7 @@ describe('SlickRowDetailView', () => {
406410 const handlerSpy = jest . spyOn ( plugin . eventHandler , 'subscribe' ) ;
407411 const appendSpy = jest
408412 . spyOn ( angularUtilServiceStub , 'createAngularComponentAppendToDom' )
409- . mockReturnValue ( { componentRef : { instance : jest . fn ( ) } } as any ) ;
413+ . mockReturnValue ( { componentRef : { instance : jest . fn ( ) , destroy : jest . fn ( ) } } as any ) ;
410414
411415 plugin . init ( gridStub ) ;
412416 plugin . onBeforeRowDetailToggle = new SlickEvent ( ) ;
0 commit comments