@@ -180,7 +180,7 @@ describe('ExtensionService', () => {
180180 expect ( gridSpy ) . toHaveBeenCalled ( ) ;
181181 expect ( getAddonSpy ) . toHaveBeenCalled ( ) ;
182182 expect ( extSpy ) . toHaveBeenCalled ( ) ;
183- expect ( output . instance ) . toEqual ( instance ) ;
183+ expect ( output ! . instance ) . toEqual ( instance ) ;
184184 expect ( output ) . toEqual ( { name : ExtensionName . gridMenu , addon : instanceMock , instance : instanceMock , class : extensionGridMenuStub } as ExtensionModel ) ;
185185 } ) ;
186186 } ) ;
@@ -259,7 +259,7 @@ describe('ExtensionService', () => {
259259 expect ( gridSpy ) . toHaveBeenCalled ( ) ;
260260 expect ( getAddonSpy ) . toHaveBeenCalled ( ) ;
261261 expect ( extSpy ) . toHaveBeenCalled ( ) ;
262- expect ( output . instance ) . toEqual ( instance ) ;
262+ expect ( output ! . instance ) . toEqual ( instance ) ;
263263 expect ( output ) . toEqual ( { name : ExtensionName . gridMenu , addon : instanceMock , instance : instanceMock , class : extensionGridMenuStub } as ExtensionModel ) ;
264264 } ) ;
265265
@@ -448,7 +448,7 @@ describe('ExtensionService', () => {
448448 } ) ;
449449
450450 describe ( 'createExtensionsBeforeGridCreation method' , ( ) => {
451- let instanceMock ;
451+ let instanceMock : any ;
452452
453453 beforeEach ( ( ) => {
454454 instanceMock = { onColumnsChanged : ( ) => { } } ;
@@ -703,36 +703,6 @@ describe('ExtensionService', () => {
703703 expect ( setColumnsSpy ) . toHaveBeenCalledWith ( columnsMock ) ;
704704 } ) ;
705705
706- it ( 'should re-register the Header Button when enable and method is called with new column definition collection provided as argument' , ( ) => {
707- const instanceMock = { onColumnsChanged : jest . fn ( ) } ;
708- const extensionMock = { name : ExtensionName . headerButton , addon : null , instance : null , class : null } as ExtensionModel ;
709- const expectedExtension = { name : ExtensionName . headerButton , instance : instanceMock as unknown , class : null } as ExtensionModel ;
710- const gridOptionsMock = { enableHeaderButton : true } as GridOption ;
711- const columnsMock = [
712- { id : 'field1' , field : 'field1' , nameKey : 'HELLO' } ,
713- { id : 'field2' , field : 'field2' , nameKey : 'WORLD' }
714- ] as Column [ ] ;
715-
716- jest . spyOn ( SharedService . prototype , 'gridOptions' , 'get' ) . mockReturnValue ( gridOptionsMock ) ;
717- jest . spyOn ( SharedService . prototype , 'grid' , 'get' ) . mockReturnValue ( gridStub ) ;
718- const spyGetExt = jest . spyOn ( service , 'getExtensionByName' ) . mockReturnValue ( extensionMock ) ;
719- const spyGmDispose = jest . spyOn ( extensionHeaderButtonStub , 'dispose' ) ;
720- const spyGmRegister = jest . spyOn ( extensionHeaderButtonStub , 'register' ) . mockReturnValue ( instanceMock ) ;
721- const spyAllCols = jest . spyOn ( SharedService . prototype , 'allColumns' , 'set' ) ;
722- const setColumnsSpy = jest . spyOn ( gridStub , 'setColumns' ) ;
723-
724- service . renderColumnHeaders ( columnsMock ) ;
725-
726- expect ( expectedExtension ) . toEqual ( expectedExtension ) ;
727- expect ( spyGetExt ) . toHaveBeenCalled ( ) ;
728- expect ( expectedExtension ) . toEqual ( expectedExtension ) ;
729- expect ( spyGetExt ) . toHaveBeenCalled ( ) ;
730- expect ( spyGmDispose ) . toHaveBeenCalled ( ) ;
731- expect ( spyGmRegister ) . toHaveBeenCalled ( ) ;
732- expect ( spyAllCols ) . toHaveBeenCalledWith ( columnsMock ) ;
733- expect ( setColumnsSpy ) . toHaveBeenCalledWith ( columnsMock ) ;
734- } ) ;
735-
736706 it ( 'should re-register the Header Menu when enable and method is called with new column definition collection provided as argument' , ( ) => {
737707 const instanceMock = { onColumnsChanged : jest . fn ( ) } ;
738708 const extensionMock = { name : ExtensionName . headerMenu , addon : null , instance : null , class : null } as ExtensionModel ;
@@ -767,7 +737,7 @@ describe('ExtensionService', () => {
767737
768738 describe ( 'without ngx-translate' , ( ) => {
769739 beforeEach ( ( ) => {
770- translate = null ;
740+ ( translate as any ) = null ;
771741 service = new ExtensionService (
772742 // extensions
773743 extensionStub as unknown as AutoTooltipExtension ,
0 commit comments