Update deprecated html language features

This commit is contained in:
Logan Ramos
2021-05-04 14:03:20 -04:00
parent 135142e497
commit 1469a9840f
9 changed files with 23 additions and 23 deletions

View File

@@ -23,24 +23,24 @@ export function assertCompletion(completions: CompletionList, expected: ItemDesc
return completion.label === expected.label;
});
if (expected.notAvailable) {
assert.equal(matches.length, 0, `${expected.label} should not existing is results`);
assert.strictEqual(matches.length, 0, `${expected.label} should not existing is results`);
return;
}
assert.equal(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`);
assert.strictEqual(matches.length, 1, `${expected.label} should only existing once: Actual: ${completions.items.map(c => c.label).join(', ')}`);
let match = matches[0];
if (expected.documentation) {
assert.equal(match.documentation, expected.documentation);
assert.strictEqual(match.documentation, expected.documentation);
}
if (expected.kind) {
assert.equal(match.kind, expected.kind);
assert.strictEqual(match.kind, expected.kind);
}
if (expected.resultText && match.textEdit) {
const edit = TextEdit.is(match.textEdit) ? match.textEdit : TextEdit.replace(match.textEdit.replace, match.textEdit.newText);
assert.equal(TextDocument.applyEdits(document, [edit]), expected.resultText);
assert.strictEqual(TextDocument.applyEdits(document, [edit]), expected.resultText);
}
if (expected.command) {
assert.deepEqual(match.command, expected.command);
assert.deepStrictEqual(match.command, expected.command);
}
}
@@ -65,7 +65,7 @@ export async function testCompletionFor(value: string, expected: { count?: numbe
let list = await mode.doComplete!(document, position, context);
if (expected.count) {
assert.equal(list.items.length, expected.count);
assert.strictEqual(list.items.length, expected.count);
}
if (expected.items) {
for (let item of expected.items) {