Skip to content

Commit 8c360ac

Browse files
committed
try fixing more jedi tests
1 parent e0306c7 commit 8c360ac

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

src/test/languageServer/watcher.unit.test.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)