|
1 | | -/* -------------------------------------------------------------------------------------------- |
2 | | - * Copyright (c) Microsoft Corporation. All rights reserved. |
3 | | - * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | | - * ------------------------------------------------------------------------------------------ */ |
| 1 | +// /* -------------------------------------------------------------------------------------------- |
| 2 | +// * Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +// * Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 | +// * ------------------------------------------------------------------------------------------ */ |
5 | 5 |
|
6 | | -import * as vscode from 'vscode'; |
7 | | -import * as assert from 'assert'; |
8 | | -import { getDocUri, activate } from './helper'; |
| 6 | +// import * as vscode from 'vscode'; |
| 7 | +// import * as assert from 'assert'; |
| 8 | +// import { getDocUri, activate } from './helper'; |
9 | 9 |
|
10 | | -suite('Should do completion', () => { |
11 | | - const docUri = getDocUri('completion.txt'); |
| 10 | +// suite('Should do completion', () => { |
| 11 | +// const docUri = getDocUri('completion.txt'); |
12 | 12 |
|
13 | | - test('Completes JS/TS in txt file', async () => { |
14 | | - await testCompletion(docUri, new vscode.Position(0, 0), { |
15 | | - items: [ |
16 | | - { label: 'JavaScript', kind: vscode.CompletionItemKind.Text }, |
17 | | - { label: 'TypeScript', kind: vscode.CompletionItemKind.Text } |
18 | | - ] |
19 | | - }); |
20 | | - }); |
21 | | -}); |
| 13 | +// test('Completes JS/TS in txt file', async () => { |
| 14 | +// await testCompletion(docUri, new vscode.Position(0, 0), { |
| 15 | +// items: [ |
| 16 | +// { label: 'JavaScript', kind: vscode.CompletionItemKind.Text }, |
| 17 | +// { label: 'TypeScript', kind: vscode.CompletionItemKind.Text } |
| 18 | +// ] |
| 19 | +// }); |
| 20 | +// }); |
| 21 | +// }); |
22 | 22 |
|
23 | | -async function testCompletion( |
24 | | - docUri: vscode.Uri, |
25 | | - position: vscode.Position, |
26 | | - expectedCompletionList: vscode.CompletionList |
27 | | -) { |
28 | | - await activate(docUri); |
| 23 | +// async function testCompletion( |
| 24 | +// docUri: vscode.Uri, |
| 25 | +// position: vscode.Position, |
| 26 | +// expectedCompletionList: vscode.CompletionList |
| 27 | +// ) { |
| 28 | +// await activate(docUri); |
29 | 29 |
|
30 | | - // Executing the command `vscode.executeCompletionItemProvider` to simulate triggering completion |
31 | | - const actualCompletionList = (await vscode.commands.executeCommand( |
32 | | - 'vscode.executeCompletionItemProvider', |
33 | | - docUri, |
34 | | - position |
35 | | - )) as vscode.CompletionList; |
| 30 | +// // Executing the command `vscode.executeCompletionItemProvider` to simulate triggering completion |
| 31 | +// const actualCompletionList = (await vscode.commands.executeCommand( |
| 32 | +// 'vscode.executeCompletionItemProvider', |
| 33 | +// docUri, |
| 34 | +// position |
| 35 | +// )) as vscode.CompletionList; |
36 | 36 |
|
37 | | - assert.ok(actualCompletionList.items.length >= 2); |
38 | | - expectedCompletionList.items.forEach((expectedItem, i) => { |
39 | | - const actualItem = actualCompletionList.items[i]; |
40 | | - assert.equal(actualItem.label, expectedItem.label); |
41 | | - assert.equal(actualItem.kind, expectedItem.kind); |
42 | | - }); |
43 | | -} |
| 37 | +// assert.ok(actualCompletionList.items.length >= 2); |
| 38 | +// expectedCompletionList.items.forEach((expectedItem, i) => { |
| 39 | +// const actualItem = actualCompletionList.items[i]; |
| 40 | +// assert.equal(actualItem.label, expectedItem.label); |
| 41 | +// assert.equal(actualItem.kind, expectedItem.kind); |
| 42 | +// }); |
| 43 | +// } |
0 commit comments