From e7e6dd3c6e757b0d5ca51f0dddf3d43cbe8b566c Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 9 Aug 2023 11:51:38 +0200 Subject: [PATCH] fix tests --- .../workbench/contrib/chat/test/common/chatService.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/test/common/chatService.test.ts b/src/vs/workbench/contrib/chat/test/common/chatService.test.ts index 2b8ea83543da9..a2f01a9d9ed5d 100644 --- a/src/vs/workbench/contrib/chat/test/common/chatService.test.ts +++ b/src/vs/workbench/contrib/chat/test/common/chatService.test.ts @@ -20,6 +20,9 @@ import { ChatService } from 'vs/workbench/contrib/chat/common/chatServiceImpl'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { TestContextService, TestExtensionService, TestStorageService } from 'vs/workbench/test/common/workbenchTestServices'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { ChatSlashCommandService, IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands'; +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; +import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; class SimpleTestProvider extends Disposable implements IChatProvider { private static sessionId = 0; @@ -61,7 +64,9 @@ suite('Chat', () => { let instantiationService: TestInstantiationService; suiteSetup(async () => { - instantiationService = new TestInstantiationService(); + instantiationService = new TestInstantiationService(new ServiceCollection( + [IChatSlashCommandService, new SyncDescriptor(ChatSlashCommandService)] + )); instantiationService.stub(IStorageService, storageService = new TestStorageService()); instantiationService.stub(ILogService, new NullLogService()); instantiationService.stub(IExtensionService, new TestExtensionService());