angular/vscode-ng-language-service/integration/e2e/completion_spec.ts
Joey Perrott 863c7eaafe build: migrate vscode extension into repo (#63924)
Migrate the vscode extension for angular into this repository.

PR Close #63924
2025-09-24 20:24:32 +00:00

20 lines
669 B
TypeScript

import * as vscode from 'vscode';
import {activate, COMPLETION_COMMAND, FOO_TEMPLATE_URI} from './helper';
describe('Angular Ivy 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);
});
});