add path to details for executable terminal suggestions, prevent duplication (#238080)

This commit is contained in:
Megan Rogge
2025-01-17 13:26:37 -06:00
committed by GitHub
parent 87ed97df8b
commit cff1a6a703
2 changed files with 45 additions and 28 deletions

View File

@@ -150,7 +150,7 @@ suite('Terminal Suggest', () => {
const prefix = commandLine.slice(0, cursorPosition).split(' ').at(-1) || '';
const filesRequested = testSpec.expectedResourceRequests?.type === 'files' || testSpec.expectedResourceRequests?.type === 'both';
const foldersRequested = testSpec.expectedResourceRequests?.type === 'folders' || testSpec.expectedResourceRequests?.type === 'both';
const result = await getCompletionItemsFromSpecs(completionSpecs, { commandLine, cursorPosition }, availableCommands, prefix, testCwd);
const result = await getCompletionItemsFromSpecs(completionSpecs, { commandLine, cursorPosition }, availableCommands.map(c => { return { label: c }; }), prefix, testCwd);
deepStrictEqual(result.items.map(i => i.label).sort(), (testSpec.expectedCompletions ?? []).sort());
strictEqual(result.filesRequested, filesRequested);
strictEqual(result.foldersRequested, foldersRequested);