summaryrefslogtreecommitdiff
path: root/client/src/test/completion.test.ts
diff options
context:
space:
mode:
authorbscan <10503608+bscan@users.noreply.github.com>2022-02-28 22:18:24 -0500
committerbscan <10503608+bscan@users.noreply.github.com>2022-02-28 22:18:24 -0500
commit446e2e081be1bddfa4d49f873999d0ec7f3aff5b (patch)
tree09e47b5300af71d4bad9ffc0a21274231f5ccd1d /client/src/test/completion.test.ts
parentea1b5c7ac09743ae4f34fea1be03364600bd4dc1 (diff)
downloadPerlNavigator-446e2e081be1bddfa4d49f873999d0ec7f3aff5b.zip
Adding some tests
Diffstat (limited to 'client/src/test/completion.test.ts')
-rw-r--r--client/src/test/completion.test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/test/completion.test.ts b/client/src/test/completion.test.ts
index 29786f1..af0a613 100644
--- a/client/src/test/completion.test.ts
+++ b/client/src/test/completion.test.ts
@@ -10,11 +10,11 @@ import { getDocUri, activate } from './helper';
suite('Should do completion', () => {
const docUri = getDocUri('mainTest.pl');
- test('Completes JS/TS in txt file', async () => {
- await testCompletion(docUri, new vscode.Position(0, 0), {
+ // Unfortunately, this test does not work yet
+ test('Test autocompletion', async () => {
+ await testCompletion(docUri, new vscode.Position(29, 23), {
items: [
- { label: 'JavaScript', kind: vscode.CompletionItemKind.Text },
- { label: 'TypeScript', kind: vscode.CompletionItemKind.Text }
+ { label: '$my_scalar', kind: vscode.CompletionItemKind.Variable },
]
});
});
@@ -34,7 +34,7 @@ async function testCompletion(
position
)) as vscode.CompletionList;
- assert.ok(actualCompletionList.items.length >= 2);
+ assert.ok(actualCompletionList.items.length == 1);
expectedCompletionList.items.forEach((expectedItem, i) => {
const actualItem = actualCompletionList.items[i];
assert.equal(actualItem.label, expectedItem.label);