Skip to content

Commit c34f818

Browse files
committed
Fix overwrite of super
1 parent b6486d3 commit c34f818

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/vs/workbench/contrib/terminalContrib/suggest/test/browser/terminalCompletionService.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { URI } from '../../../../../../base/common/uri.js';
77
import { IFileService, IFileStatWithMetadata, IResolveMetadataFileOptions } from '../../../../../../platform/files/common/files.js';
8-
import { TerminalCompletionService, TerminalResourceRequestConfig } from '../../browser/terminalCompletionService.js';
8+
import { TerminalCompletionService, TerminalResourceRequestConfig, type ITerminalCompletionProvider } from '../../browser/terminalCompletionService.js';
99
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../../base/test/common/utils.js';
1010
import assert, { fail } from 'assert';
1111
import { isWindows, type IProcessEnvironment } from '../../../../../../base/common/platform.js';
@@ -21,6 +21,7 @@ import { count } from '../../../../../../base/common/strings.js';
2121
import { WindowsShellType } from '../../../../../../platform/terminal/common/terminal.js';
2222
import { gitBashToWindowsPath, windowsToGitBashPath } from '../../browser/terminalGitBashHelpers.js';
2323
import { ILogService, NullLogService } from '../../../../../../platform/log/common/log.js';
24+
import { TerminalSuggestSettingId } from '../../common/terminalSuggestConfiguration.js';
2425

2526
const pathSeparator = isWindows ? '\\' : '/';
2627

@@ -774,7 +775,7 @@ suite('TerminalCompletionService', () => {
774775
suite('Provider Configuration', () => {
775776
// Test class that extends TerminalCompletionService to access protected methods
776777
class TestTerminalCompletionService extends TerminalCompletionService {
777-
public _getEnabledProviders(providers: ITerminalCompletionProvider[]): ITerminalCompletionProvider[] {
778+
public getEnabledProviders(providers: ITerminalCompletionProvider[]): ITerminalCompletionProvider[] {
778779
return super._getEnabledProviders(providers);
779780
}
780781
}
@@ -793,7 +794,8 @@ suite('TerminalCompletionService', () => {
793794
label: `completion-from-${id}`,
794795
kind: TerminalCompletionItemKind.Method,
795796
replacementIndex: 0,
796-
replacementLength: 0
797+
replacementLength: 0,
798+
provider: id
797799
}]
798800
};
799801
}
@@ -806,7 +808,7 @@ suite('TerminalCompletionService', () => {
806808
// Set empty configuration (no provider keys)
807809
configurationService.setUserConfiguration(TerminalSuggestSettingId.Providers, {});
808810

809-
const result = testTerminalCompletionService._getEnabledProviders(providers);
811+
const result = testTerminalCompletionService.getEnabledProviders(providers);
810812

811813
// Both providers should be enabled since they're not explicitly disabled
812814
assert.strictEqual(result.length, 2, 'Should enable both providers by default');
@@ -824,7 +826,7 @@ suite('TerminalCompletionService', () => {
824826
'provider1': false
825827
});
826828

827-
const result = testTerminalCompletionService._getEnabledProviders(providers);
829+
const result = testTerminalCompletionService.getEnabledProviders(providers);
828830

829831
// Only provider2 should be enabled
830832
assert.strictEqual(result.length, 1, 'Should enable only one provider');
@@ -842,7 +844,7 @@ suite('TerminalCompletionService', () => {
842844
'provider1': true
843845
});
844846

845-
const result = testTerminalCompletionService._getEnabledProviders(providers);
847+
const result = testTerminalCompletionService.getEnabledProviders(providers);
846848

847849
// Both providers should be enabled
848850
assert.strictEqual(result.length, 2, 'Should enable both providers');
@@ -862,7 +864,7 @@ suite('TerminalCompletionService', () => {
862864
'provider2': false
863865
});
864866

865-
const result = testTerminalCompletionService._getEnabledProviders(providers);
867+
const result = testTerminalCompletionService.getEnabledProviders(providers);
866868

867869
// provider1 and provider3 should be enabled, provider2 should be disabled
868870
assert.strictEqual(result.length, 2, 'Should enable two providers');

0 commit comments

Comments
 (0)