Stub null hover service in some tests

This commit is contained in:
Daniel Imms 2024-04-03 08:18:37 -07:00
parent 947bb16de1
commit b127f770c8
No known key found for this signature in database
GPG key ID: E5CF412B63651C69
2 changed files with 6 additions and 0 deletions

View file

@ -19,6 +19,8 @@ import { DisposableStore } from 'vs/base/common/lifecycle';
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
import { CancellationToken } from 'vs/base/common/cancellation';
import { URI, UriComponents } from 'vs/base/common/uri';
import { IHoverService } from 'vs/platform/hover/browser/hover';
import { NullHoverService } from 'vs/platform/hover/test/browser/nullHoverService';
class TestCommentThread implements CommentThread<IRange> {
isDocumentCommentThread(): this is CommentThread<IRange> {
@ -118,6 +120,7 @@ suite('Comments View', function () {
disposables = new DisposableStore();
instantiationService = workbenchInstantiationService({}, disposables);
instantiationService.stub(IConfigurationService, new TestConfigurationService());
instantiationService.stub(IHoverService, NullHoverService);
instantiationService.stub(IContextViewService, {});
instantiationService.stub(IViewDescriptorService, new TestViewDescriptorService());
commentService = instantiationService.createInstance(CommentService);

View file

@ -58,6 +58,8 @@ import { IViewsService } from 'vs/workbench/services/views/common/viewsService';
import { ChatSlashCommandService, IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands';
import { ChatWidgetService } from 'vs/workbench/contrib/chat/browser/chatWidget';
import { ChatWidgetHistoryService, IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService';
import { IHoverService } from 'vs/platform/hover/browser/hover';
import { NullHoverService } from 'vs/platform/hover/test/browser/nullHoverService';
suite('InteractiveChatController', function () {
class TestController extends InlineChatController {
@ -121,6 +123,7 @@ suite('InteractiveChatController', function () {
[IChatVariablesService, new MockChatVariablesService()],
[ILogService, new NullLogService()],
[ITelemetryService, NullTelemetryService],
[IHoverService, NullHoverService],
[IExtensionService, new TestExtensionService()],
[IContextKeyService, new MockContextKeyService()],
[IViewsService, new TestExtensionService()],