@@ -30,6 +30,7 @@ const gridStub = {
30
30
getColumnIndex : jest . fn ( ) ,
31
31
getScrollbarDimensions : jest . fn ( ) ,
32
32
getOptions : jest . fn ( ) ,
33
+ getPluginByName : jest . fn ( ) ,
33
34
getColumns : jest . fn ( ) ,
34
35
setColumns : jest . fn ( ) ,
35
36
onColumnsReordered : jest . fn ( ) ,
@@ -413,7 +414,8 @@ describe('ExtensionService', () => {
413
414
const gridOptionsMock = { registerPlugins : [ pluginMock ] } as GridOption ;
414
415
const gridSpy = jest . spyOn ( SharedService . prototype , 'grid' , 'get' ) . mockReturnValue ( gridStub ) ;
415
416
const optionSpy = jest . spyOn ( SharedService . prototype , 'gridOptions' , 'get' ) . mockReturnValue ( gridOptionsMock ) ;
416
- const pluginSpy = jest . spyOn ( SharedService . prototype . grid , 'registerPlugin' ) . mockReturnValue ( instanceMock ) ;
417
+ const pluginSpy = jest . spyOn ( SharedService . prototype . grid , 'registerPlugin' ) ;
418
+ jest . spyOn ( SharedService . prototype . grid , 'getPluginByName' ) . mockReturnValue ( instanceMock ) ;
417
419
418
420
service . bindDifferentExtensions ( ) ;
419
421
const output = service . getExtensionByName ( ExtensionName . noname ) ;
@@ -430,7 +432,8 @@ describe('ExtensionService', () => {
430
432
const gridOptionsMock = { registerPlugins : pluginMock } as GridOption ;
431
433
const gridSpy = jest . spyOn ( SharedService . prototype , 'grid' , 'get' ) . mockReturnValue ( gridStub ) ;
432
434
const optionSpy = jest . spyOn ( SharedService . prototype , 'gridOptions' , 'get' ) . mockReturnValue ( gridOptionsMock ) ;
433
- const pluginSpy = jest . spyOn ( SharedService . prototype . grid , 'registerPlugin' ) . mockReturnValue ( instanceMock ) ;
435
+ const pluginSpy = jest . spyOn ( SharedService . prototype . grid , 'registerPlugin' ) ;
436
+ jest . spyOn ( SharedService . prototype . grid , 'getPluginByName' ) . mockReturnValue ( instanceMock ) ;
434
437
435
438
service . bindDifferentExtensions ( ) ;
436
439
const output = service . getExtensionByName ( ExtensionName . noname ) ;
0 commit comments