Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Aug 9, 2023
1 parent 465b947 commit e7e6dd3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -61,7 +64,9 @@ suite('Chat', () => {
let instantiationService: TestInstantiationService;

suiteSetup(async () => {
instantiationService = new TestInstantiationService();
instantiationService = new TestInstantiationService(new ServiceCollection(
[IChatSlashCommandService, new SyncDescriptor<any>(ChatSlashCommandService)]
));
instantiationService.stub(IStorageService, storageService = new TestStorageService());
instantiationService.stub(ILogService, new NullLogService());
instantiationService.stub(IExtensionService, new TestExtensionService());
Expand Down

0 comments on commit e7e6dd3

Please sign in to comment.