Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Jan 13, 2022
1 parent 97d83fa commit c7ead64
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ suite('Set Interpreter Command', () => {
const defaultInterpreterPath = 'defaultInterpreterPath';
const defaultInterpreterPathSuggestion = {
label: `${Octicons.Gear} ${InterpreterQuickPickList.defaultInterpreterPath.label()}`,
detail: defaultInterpreterPath,
description: defaultInterpreterPath,
path: defaultInterpreterPath,
alwaysShow: true,
};
Expand Down Expand Up @@ -210,12 +210,11 @@ suite('Set Interpreter Command', () => {
const multiStepInput = TypeMoq.Mock.ofType<IMultiStepInput<InterpreterStateArgs>>();
const recommended = cloneDeep(item);
recommended.label = `${Octicons.Star} ${item.label}`;
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
const separator = { label: EnvGroups.Conda, kind: QuickPickItemKind.Separator };
recommended.description = interpreterPath;
const suggestions = [
expectedEnterInterpreterPathSuggestion,
defaultInterpreterPathSuggestion,
separator,
{ kind: QuickPickItemKind.Separator, label: EnvGroups.Recommended },
recommended,
];
const expectedParameters: IQuickPickParameters<QuickPickItem> = {
Expand Down Expand Up @@ -305,18 +304,20 @@ suite('Set Interpreter Command', () => {
.returns(() => item);
const recommended = cloneDeep(item);
recommended.label = `${Octicons.Star} ${item.label}`;
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
recommended.description = interpreterPath;
const suggestions = [
expectedEnterInterpreterPathSuggestion,
defaultInterpreterPathSuggestion,
{ kind: QuickPickItemKind.Separator, label: EnvGroups.Recommended },
recommended,
{ label: EnvGroups.Workspace, kind: QuickPickItemKind.Separator },
interpreterItems[0],
{ label: EnvGroups.VirtualEnvWrapper, kind: QuickPickItemKind.Separator },
interpreterItems[1],
interpreterItems[2],
{ label: EnvGroups.Conda, kind: QuickPickItemKind.Separator },
interpreterItems[3],
recommended,
item,
{ label: EnvGroups.Global, kind: QuickPickItemKind.Separator },
interpreterItems[5],
];
Expand Down Expand Up @@ -392,12 +393,12 @@ suite('Set Interpreter Command', () => {
const multiStepInput = TypeMoq.Mock.ofType<IMultiStepInput<InterpreterStateArgs>>();
const recommended = cloneDeep(item);
recommended.label = `${Octicons.Star} ${item.label}`;
recommended.description = `${interpreterPath} - ${Common.recommended()}`;
const separator = { label: EnvGroups.Conda, kind: QuickPickItemKind.Separator };
recommended.description = interpreterPath;
const separator = { label: EnvGroups.Recommended, kind: QuickPickItemKind.Separator };

const defaultPathSuggestion = {
label: `${Octicons.Gear} ${InterpreterQuickPickList.defaultInterpreterPath.label()}`,
detail: expandedDetail,
description: expandedDetail,
path: expandedPath,
alwaysShow: true,
};
Expand Down

0 comments on commit c7ead64

Please sign in to comment.