Skip to content

Commit 3e5e545

Browse files
committed
Update tests
1 parent 6a3e7f9 commit 3e5e545

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/runTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
22

3-
import { runTests } from 'vscode-test';
3+
import { runTests } from '@vscode/test-electron';
44

55
async function main() {
66
try {

test/suite/providers/completionProvider.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ suite('ParamHintCompletionProvider', () => {
1818
let param = "first: str, paramName:";
1919
let actual = await providerResult(provider, param, "\n\nparamName = 12");
2020
assert.notStrictEqual(actual, null);
21-
assert.strictEqual(actual?.items[0].label.trim(), PythonType.Int);
21+
assert.strictEqual(actual?.items[0].label, ` ${PythonType.Int}`);
2222
});
2323

2424
test("provides items for param on new line", async () => {
@@ -66,7 +66,7 @@ suite('ParamHintCompletionProvider', () => {
6666
let result = await providerResult(provider, param);
6767

6868
assert.notStrictEqual(result, null);
69-
const actual: string[] | undefined = result?.items.map(item => item.label.trim());
69+
const actual: string[] | undefined = result?.items.map(item => item.label.toString().trim());
7070
assert.deepStrictEqual(actual, expected);
7171
});
7272

@@ -77,7 +77,7 @@ suite('ParamHintCompletionProvider', () => {
7777
let result = await providerResult(provider, param, "\n\nparam = Class()");
7878

7979
assert.notStrictEqual(result, null);
80-
const actual: string[] | undefined = result?.items.map(item => item.label.trim());
80+
const actual: string[] | undefined = result?.items.map(item => item.label.toString().trim());
8181
assert.deepStrictEqual(actual, expected);
8282
});
8383

@@ -140,7 +140,7 @@ suite('ParamHintCompletionProvider', () => {
140140
test("does not include * in parameter name", async () => {
141141
let param = "*paramName:";
142142
let actual = await providerResult(provider, param, "\n\nparamName = 12");
143-
assert.strictEqual(actual?.items[0].label.trim(), PythonType.Int);
143+
assert.strictEqual(actual?.items[0].label, ` ${PythonType.Int}`);
144144
});
145145

146146
});

0 commit comments

Comments
 (0)