File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,26 @@ suite('Language server watcher', () => {
3535
3636 setup ( ( ) => {
3737 disposables = [ ] ;
38- watcher = new LanguageServerWatcher (
39- { } as IServiceContainer ,
38+ // Create a mock ILogOutputChannel
39+ const mockOutputChannel = { } as ILogOutputChannel ;
4040
41+ // Create a mock IApplicationShell with createOutputChannel method
42+ const mockApplicationShell = ( {
43+ createOutputChannel : ( ) => mockOutputChannel ,
44+ } as unknown ) as IApplicationShell ;
45+
46+ // Create a mock service container with the required get method
47+ const mockServiceContainer = {
48+ get : ( serviceIdentifier : any ) => {
49+ if ( serviceIdentifier === IApplicationShell ) {
50+ return mockApplicationShell ;
51+ }
52+ return undefined ;
53+ } ,
54+ } as IServiceContainer ;
55+
56+ watcher = new LanguageServerWatcher (
57+ mockServiceContainer ,
4158 {
4259 getSettings : ( ) => ( { languageServer : LanguageServerType . None } ) ,
4360 } as IConfigurationService ,
You can’t perform that action at this time.
0 commit comments