33
44import * as assert from 'assert' ;
55
6- import { IWorkspaceService , ICommandManager } from '../../client/common/application/types' ;
7- import { IExperimentService , IConfigurationService , IInterpreterPathService } from '../../client/common/types' ;
6+ import { IWorkspaceService , ICommandManager , IApplicationShell } from '../../client/common/application/types' ;
7+ import {
8+ IExperimentService ,
9+ IConfigurationService ,
10+ IInterpreterPathService ,
11+ ILogOutputChannel ,
12+ } from '../../client/common/types' ;
813import { IEnvironmentVariablesProvider } from '../../client/common/variables/types' ;
914import { IInterpreterService } from '../../client/interpreter/contracts' ;
1015import { IServiceContainer } from '../../client/ioc/types' ;
@@ -15,8 +20,26 @@ suite('Language Server - Jedi LS extension manager', () => {
1520 let manager : JediLSExtensionManager ;
1621
1722 setup ( ( ) => {
23+ // Create a mock ILogOutputChannel
24+ const mockOutputChannel = { } as ILogOutputChannel ;
25+
26+ // Create a mock IApplicationShell with createOutputChannel method
27+ const mockApplicationShell = ( {
28+ createOutputChannel : ( ) => mockOutputChannel ,
29+ } as unknown ) as IApplicationShell ;
30+
31+ // Create a mock service container with the required get method
32+ const mockServiceContainer = {
33+ get : ( serviceIdentifier : any ) => {
34+ if ( serviceIdentifier === IApplicationShell ) {
35+ return mockApplicationShell ;
36+ }
37+ return undefined ;
38+ } ,
39+ } as IServiceContainer ;
40+
1841 manager = new JediLSExtensionManager (
19- { } as IServiceContainer ,
42+ mockServiceContainer ,
2043 { } as IExperimentService ,
2144 { } as IWorkspaceService ,
2245 { } as IConfigurationService ,
0 commit comments