mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Merge pull request #158782 from Semesse/exthost-lf-test
Fix exthost language features test
This commit is contained in:
commit
d5a59298e2
1 changed files with 10 additions and 13 deletions
|
@ -411,12 +411,11 @@ suite('ExtHostLanguageFeatures', function () {
|
|||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None).then(value => {
|
||||
assert.strictEqual(value.length, 1);
|
||||
const [entry] = value;
|
||||
const hovers = await getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None);
|
||||
assert.strictEqual(hovers.length, 1);
|
||||
const [entry] = hovers;
|
||||
assert.deepStrictEqual(entry.range, { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 5 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
test('HoverProvider, given range', async () => {
|
||||
|
@ -428,12 +427,11 @@ suite('ExtHostLanguageFeatures', function () {
|
|||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None).then(value => {
|
||||
assert.strictEqual(value.length, 1);
|
||||
const [entry] = value;
|
||||
const hovers = await getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None);
|
||||
assert.strictEqual(hovers.length, 1);
|
||||
const [entry] = hovers;
|
||||
assert.deepStrictEqual(entry.range, { startLineNumber: 4, startColumn: 1, endLineNumber: 9, endColumn: 8 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
test('HoverProvider, registration order', async () => {
|
||||
|
@ -473,9 +471,8 @@ suite('ExtHostLanguageFeatures', function () {
|
|||
}));
|
||||
|
||||
await rpcProtocol.sync();
|
||||
getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None).then(value => {
|
||||
assert.strictEqual(value.length, 1);
|
||||
});
|
||||
const hovers = await getHoverPromise(languageFeaturesService.hoverProvider, model, new EditorPosition(1, 1), CancellationToken.None);
|
||||
assert.strictEqual(hovers.length, 1);
|
||||
});
|
||||
|
||||
// --- occurrences
|
||||
|
|
Loading…
Reference in a new issue