Skip to content

Commit aeefac1

Browse files
author
Kartik Raj
committed
Fix unit tests
1 parent 9d2fb27 commit aeefac1

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ suite('Set Interpreter Command', () => {
118118
const defaultInterpreterPath = 'defaultInterpreterPath';
119119
const defaultInterpreterPathSuggestion = {
120120
label: `${Octicons.Gear} ${InterpreterQuickPickList.defaultInterpreterPath.label()}`,
121-
detail: defaultInterpreterPath,
121+
description: defaultInterpreterPath,
122122
path: defaultInterpreterPath,
123123
alwaysShow: true,
124124
};
@@ -210,12 +210,11 @@ suite('Set Interpreter Command', () => {
210210
const multiStepInput = TypeMoq.Mock.ofType<IMultiStepInput<InterpreterStateArgs>>();
211211
const recommended = cloneDeep(item);
212212
recommended.label = `${Octicons.Star} ${item.label}`;
213-
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
214-
const separator = { label: EnvGroups.Conda, kind: QuickPickItemKind.Separator };
213+
recommended.description = interpreterPath;
215214
const suggestions = [
216215
expectedEnterInterpreterPathSuggestion,
217216
defaultInterpreterPathSuggestion,
218-
separator,
217+
{ kind: QuickPickItemKind.Separator, label: EnvGroups.Recommended },
219218
recommended,
220219
];
221220
const expectedParameters: IQuickPickParameters<QuickPickItem> = {
@@ -305,18 +304,20 @@ suite('Set Interpreter Command', () => {
305304
.returns(() => item);
306305
const recommended = cloneDeep(item);
307306
recommended.label = `${Octicons.Star} ${item.label}`;
308-
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
307+
recommended.description = interpreterPath;
309308
const suggestions = [
310309
expectedEnterInterpreterPathSuggestion,
311310
defaultInterpreterPathSuggestion,
311+
{ kind: QuickPickItemKind.Separator, label: EnvGroups.Recommended },
312+
recommended,
312313
{ label: EnvGroups.Workspace, kind: QuickPickItemKind.Separator },
313314
interpreterItems[0],
314315
{ label: EnvGroups.VirtualEnvWrapper, kind: QuickPickItemKind.Separator },
315316
interpreterItems[1],
316317
interpreterItems[2],
317318
{ label: EnvGroups.Conda, kind: QuickPickItemKind.Separator },
318319
interpreterItems[3],
319-
recommended,
320+
item,
320321
{ label: EnvGroups.Global, kind: QuickPickItemKind.Separator },
321322
interpreterItems[5],
322323
];
@@ -392,12 +393,12 @@ suite('Set Interpreter Command', () => {
392393
const multiStepInput = TypeMoq.Mock.ofType<IMultiStepInput<InterpreterStateArgs>>();
393394
const recommended = cloneDeep(item);
394395
recommended.label = `${Octicons.Star} ${item.label}`;
395-
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
396-
const separator = { label: EnvGroups.Conda, kind: QuickPickItemKind.Separator };
396+
recommended.description = interpreterPath;
397+
const separator = { label: EnvGroups.Recommended, kind: QuickPickItemKind.Separator };
397398

398399
const defaultPathSuggestion = {
399400
label: `${Octicons.Gear} ${InterpreterQuickPickList.defaultInterpreterPath.label()}`,
400-
detail: expandedDetail,
401+
description: expandedDetail,
401402
path: expandedPath,
402403
alwaysShow: true,
403404
};

0 commit comments

Comments
 (0)