Skip to content

Commit 2f562a8

Browse files
author
aiday-mar
committed
Adding NullLogService into service collection
1 parent e39260a commit 2f562a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/vs/editor/contrib/stickyScroll/test/browser/stickyScroll.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import { LanguageFeaturesService } from 'vs/editor/common/services/languageFeatu
1212
import { DocumentSymbol, SymbolKind } from 'vs/editor/common/languages';
1313
import { StickyLineCandidate, StickyLineCandidateProvider } from 'vs/editor/contrib/stickyScroll/browser/stickyScrollProvider';
1414
import { EditorOption } from 'vs/editor/common/config/editorOptions';
15+
import { ILogService, NullLogService } from 'vs/platform/log/common/log';
1516

1617
suite('Sticky Scroll Tests', () => {
1718

1819
const serviceCollection = new ServiceCollection(
19-
[ILanguageFeaturesService, new LanguageFeaturesService()]
20+
[ILanguageFeaturesService, new LanguageFeaturesService()],
21+
[ILogService, new NullLogService()]
2022
);
2123

2224
const text = [
@@ -121,10 +123,10 @@ suite('Sticky Scroll Tests', () => {
121123
await withAsyncTestCodeEditor(model, { serviceCollection }, async (editor, _viewModel, instantiationService) => {
122124

123125
const stickyScrollController: StickyScrollController = editor.registerAndInstantiateContribution(StickyScrollController.ID, StickyScrollController);
124-
await stickyScrollController.stickyScrollCandidateProvider.update();
125126
const lineHeight: number = editor.getOption(EditorOption.lineHeight);
126127
const languageService: ILanguageFeaturesService = instantiationService.get(ILanguageFeaturesService);
127128
languageService.documentSymbolProvider.register('*', documentSymbolProviderForTestModel());
129+
await stickyScrollController.stickyScrollCandidateProvider.update();
128130
let state;
129131

130132
editor.setScrollTop(1);
@@ -163,12 +165,11 @@ suite('Sticky Scroll Tests', () => {
163165
await withAsyncTestCodeEditor(model, { serviceCollection }, async (editor, viewModel, instantiationService) => {
164166

165167
const stickyScrollController: StickyScrollController = editor.registerAndInstantiateContribution(StickyScrollController.ID, StickyScrollController);
166-
await stickyScrollController.stickyScrollCandidateProvider.update();
167168
const lineHeight = editor.getOption(EditorOption.lineHeight);
168169

169170
const languageService = instantiationService.get(ILanguageFeaturesService);
170171
languageService.documentSymbolProvider.register('*', documentSymbolProviderForTestModel());
171-
172+
await stickyScrollController.stickyScrollCandidateProvider.update();
172173
editor.setHiddenAreas([{ startLineNumber: 2, endLineNumber: 2, startColumn: 1, endColumn: 1 }, { startLineNumber: 10, endLineNumber: 11, startColumn: 1, endColumn: 1 }]);
173174
let state;
174175

0 commit comments

Comments
 (0)