angular/vscode-ng-language-service/integration/e2e/completion_spec.ts
Alan Agius 70fb1d6cf2 ci: try to resolve vscode extension e2e flakes
Update e2e test runner to VS Code 1.102.0, streamline test activation, and manage temporary directories via `TEST_TMPDIR`.

(cherry picked from commit 1a094ddb2b)
2025-11-20 17:03:18 -05:00

20 lines
665 B
TypeScript

import * as vscode from 'vscode';
import {activate, COMPLETION_COMMAND, FOO_TEMPLATE_URI} from './helper';
describe('Angular LS completions', () => {
beforeAll(async () => {
await activate(FOO_TEMPLATE_URI);
});
it(`does not duplicate HTML completions in external templates`, async () => {
const position = new vscode.Position(0, 0);
const completionItem = await vscode.commands.executeCommand<vscode.CompletionList>(
COMPLETION_COMMAND,
FOO_TEMPLATE_URI,
position,
);
const regionCompletions = completionItem?.items?.filter((i) => i.label === '#region') ?? [];
expect(regionCompletions.length).toBe(1);
});
});