Removed deprecated assert from css-language-features
This commit is contained in:
parent
08e090781b
commit
e44bd2d93d
2 changed files with 8 additions and 8 deletions
|
@ -24,10 +24,10 @@ suite('Completions', () => {
|
|||
return completion.label === expected.label;
|
||||
});
|
||||
|
||||
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.resultText && TextEdit.is(match.textEdit)) {
|
||||
assert.equal(TextDocument.applyEdits(document, [match.textEdit]), expected.resultText);
|
||||
assert.strictEqual(TextDocument.applyEdits(document, [match.textEdit]), expected.resultText);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ suite('Completions', () => {
|
|||
let list = await cssLanguageService.doComplete2(document, position, stylesheet, 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) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { URI } from 'vscode-uri';
|
||||
import { URI } from 'vscode-uri';
|
||||
import { resolve } from 'path';
|
||||
import { TextDocument, DocumentLink } from 'vscode-languageserver-types';
|
||||
import { WorkspaceFolder } from 'vscode-languageserver-protocol';
|
||||
|
@ -26,10 +26,10 @@ suite('Links', () => {
|
|||
return document.offsetAt(link.range.start) === expected.offset;
|
||||
});
|
||||
|
||||
assert.equal(matches.length, 1, `${expected.offset} should only existing once: Actual: ${links.map(l => document.offsetAt(l.range.start)).join(', ')}`);
|
||||
assert.strictEqual(matches.length, 1, `${expected.offset} should only existing once: Actual: ${links.map(l => document.offsetAt(l.range.start)).join(', ')}`);
|
||||
let match = matches[0];
|
||||
assert.equal(document.getText(match.range), expected.value);
|
||||
assert.equal(match.target, expected.target);
|
||||
assert.strictEqual(document.getText(match.range), expected.value);
|
||||
assert.strictEqual(match.target, expected.target);
|
||||
};
|
||||
|
||||
async function assertLinks(value: string, expected: ItemDescription[], testUri: string, workspaceFolders?: WorkspaceFolder[], lang: string = 'css'): Promise<void> {
|
||||
|
@ -47,7 +47,7 @@ suite('Links', () => {
|
|||
const stylesheet = cssLanguageService.parseStylesheet(document);
|
||||
let links = await cssLanguageService.findDocumentLinks2(document, stylesheet, context)!;
|
||||
|
||||
assert.equal(links.length, expected.length);
|
||||
assert.strictEqual(links.length, expected.length);
|
||||
|
||||
for (let item of expected) {
|
||||
assertLink(links, item, document);
|
||||
|
|
Loading…
Reference in a new issue