@@ -3,13 +3,15 @@ import { assert } from 'chai';
33import { DeepnoteActivationService } from './deepnoteActivationService' ;
44import { DeepnoteNotebookManager } from './deepnoteNotebookManager' ;
55import { IExtensionContext } from '../../platform/common/types' ;
6+ import { ILogger } from '../../platform/logging/types' ;
67import { IIntegrationManager } from './integrations/types' ;
78
89suite ( 'DeepnoteActivationService' , ( ) => {
910 let activationService : DeepnoteActivationService ;
1011 let mockExtensionContext : IExtensionContext ;
1112 let manager : DeepnoteNotebookManager ;
1213 let mockIntegrationManager : IIntegrationManager ;
14+ let mockLogger : ILogger ;
1315
1416 setup ( ( ) => {
1517 mockExtensionContext = {
@@ -22,7 +24,20 @@ suite('DeepnoteActivationService', () => {
2224 return ;
2325 }
2426 } ;
25- activationService = new DeepnoteActivationService ( mockExtensionContext , manager , mockIntegrationManager ) ;
27+ mockLogger = {
28+ error : ( ) => { } ,
29+ warn : ( ) => { } ,
30+ info : ( ) => { } ,
31+ debug : ( ) => { } ,
32+ trace : ( ) => { } ,
33+ ci : ( ) => { }
34+ } as ILogger ;
35+ activationService = new DeepnoteActivationService (
36+ mockExtensionContext ,
37+ manager ,
38+ mockIntegrationManager ,
39+ mockLogger
40+ ) ;
2641 } ) ;
2742
2843 suite ( 'constructor' , ( ) => {
@@ -92,8 +107,24 @@ suite('DeepnoteActivationService', () => {
92107 return ;
93108 }
94109 } ;
95- const service1 = new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 ) ;
96- const service2 = new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 ) ;
110+ const mockLogger1 : ILogger = {
111+ error : ( ) => { } ,
112+ warn : ( ) => { } ,
113+ info : ( ) => { } ,
114+ debug : ( ) => { } ,
115+ trace : ( ) => { } ,
116+ ci : ( ) => { }
117+ } as ILogger ;
118+ const mockLogger2 : ILogger = {
119+ error : ( ) => { } ,
120+ warn : ( ) => { } ,
121+ info : ( ) => { } ,
122+ debug : ( ) => { } ,
123+ trace : ( ) => { } ,
124+ ci : ( ) => { }
125+ } as ILogger ;
126+ const service1 = new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 , mockLogger1 ) ;
127+ const service2 = new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 , mockLogger2 ) ;
97128
98129 // Verify each service has its own context
99130 assert . strictEqual ( ( service1 as any ) . extensionContext , context1 ) ;
@@ -128,8 +159,24 @@ suite('DeepnoteActivationService', () => {
128159 return ;
129160 }
130161 } ;
131- new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 ) ;
132- new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 ) ;
162+ const mockLogger3 : ILogger = {
163+ error : ( ) => { } ,
164+ warn : ( ) => { } ,
165+ info : ( ) => { } ,
166+ debug : ( ) => { } ,
167+ trace : ( ) => { } ,
168+ ci : ( ) => { }
169+ } as ILogger ;
170+ const mockLogger4 : ILogger = {
171+ error : ( ) => { } ,
172+ warn : ( ) => { } ,
173+ info : ( ) => { } ,
174+ debug : ( ) => { } ,
175+ trace : ( ) => { } ,
176+ ci : ( ) => { }
177+ } as ILogger ;
178+ new DeepnoteActivationService ( context1 , manager1 , mockIntegrationManager1 , mockLogger3 ) ;
179+ new DeepnoteActivationService ( context2 , manager2 , mockIntegrationManager2 , mockLogger4 ) ;
133180
134181 assert . strictEqual ( context1 . subscriptions . length , 0 ) ;
135182 assert . strictEqual ( context2 . subscriptions . length , 1 ) ;
0 commit comments