mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
Merge from vscode bd0efff9e3f36d6b3e1045cee9887003af8034d7
This commit is contained in:
@@ -13,6 +13,7 @@ import { mock } from 'vs/workbench/test/browser/api/mock';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import type * as vscode from 'vscode';
|
||||
import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions';
|
||||
|
||||
suite('ExtHostDiagnostics', () => {
|
||||
|
||||
@@ -286,7 +287,7 @@ suite('ExtHostDiagnostics', () => {
|
||||
});
|
||||
|
||||
test('diagnostic eventing', async function () {
|
||||
let emitter = new Emitter<Array<string | URI>>();
|
||||
let emitter = new Emitter<Array<URI>>();
|
||||
let collection = new DiagnosticCollection('ddd', 'test', 100, new DiagnosticsShape(), emitter);
|
||||
|
||||
let diag1 = new Diagnostic(new Range(1, 1, 2, 3), 'diag1');
|
||||
@@ -316,15 +317,15 @@ suite('ExtHostDiagnostics', () => {
|
||||
|
||||
p = Event.toPromise(emitter.event).then(e => {
|
||||
assert.equal(e.length, 2);
|
||||
assert.ok(typeof e[0] === 'string');
|
||||
assert.ok(typeof e[1] === 'string');
|
||||
assert.ok(URI.isUri(e[0]));
|
||||
assert.ok(URI.isUri(e[1]));
|
||||
});
|
||||
collection.clear();
|
||||
await p;
|
||||
});
|
||||
|
||||
test('vscode.languages.onDidChangeDiagnostics Does Not Provide Document URI #49582', async function () {
|
||||
let emitter = new Emitter<Array<string | URI>>();
|
||||
let emitter = new Emitter<Array<URI>>();
|
||||
let collection = new DiagnosticCollection('ddd', 'test', 100, new DiagnosticsShape(), emitter);
|
||||
|
||||
let diag1 = new Diagnostic(new Range(1, 1, 2, 3), 'diag1');
|
||||
@@ -390,8 +391,8 @@ suite('ExtHostDiagnostics', () => {
|
||||
}
|
||||
}, new NullLogService());
|
||||
|
||||
let collection1 = diags.createDiagnosticCollection('foo');
|
||||
let collection2 = diags.createDiagnosticCollection('foo'); // warns, uses a different owner
|
||||
let collection1 = diags.createDiagnosticCollection(nullExtensionDescription.identifier, 'foo');
|
||||
let collection2 = diags.createDiagnosticCollection(nullExtensionDescription.identifier, 'foo'); // warns, uses a different owner
|
||||
|
||||
collection1.clear();
|
||||
collection2.clear();
|
||||
|
||||
Reference in New Issue
Block a user