summaryrefslogtreecommitdiff
path: root/build/extension/client/src/test/completion.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'build/extension/client/src/test/completion.test.ts')
-rw-r--r--build/extension/client/src/test/completion.test.ts44
1 files changed, 0 insertions, 44 deletions
diff --git a/build/extension/client/src/test/completion.test.ts b/build/extension/client/src/test/completion.test.ts
deleted file mode 100644
index 2cb65642..00000000
--- a/build/extension/client/src/test/completion.test.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/* --------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- * ------------------------------------------------------------------------------------------ */
-'use strict';
-
-import * as vscode from 'vscode';
-import * as assert from 'assert';
-import { getDocUri, activate } from './helper';
-
-describe('Should do completion', () => {
- const docUri = getDocUri('completion.txt');
-
- it('Completes JS/TS in txt file', async () => {
- await testCompletion(docUri, new vscode.Position(0, 0), {
- items: [
- { label: 'JavaScript', kind: vscode.CompletionItemKind.Text },
- { label: 'TypeScript', kind: vscode.CompletionItemKind.Text }
- ]
- });
- });
-});
-
-async function testCompletion(
- docUri: vscode.Uri,
- position: vscode.Position,
- expectedCompletionList: vscode.CompletionList
-) {
- await activate(docUri);
-
- // Executing the command `vscode.executeCompletionItemProvider` to simulate triggering completion
- const actualCompletionList = (await vscode.commands.executeCommand(
- 'vscode.executeCompletionItemProvider',
- docUri,
- position
- )) as vscode.CompletionList;
-
- assert.equal(actualCompletionList.items.length, expectedCompletionList.items.length);
- expectedCompletionList.items.forEach((expectedItem, i) => {
- const actualItem = actualCompletionList.items[i];
- assert.equal(actualItem.label, expectedItem.label);
- assert.equal(actualItem.kind, expectedItem.kind);
- });
-}