mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 02:58:31 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -7,7 +7,7 @@ import * as assert from 'assert';
|
||||
import { mapArrayOrNot } from 'vs/base/common/arrays';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { isPromiseCanceledError } from 'vs/base/common/errors';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { joinPath } from 'vs/base/common/resources';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
@@ -16,12 +16,12 @@ import { ExtHostSearch } from 'vs/workbench/api/node/extHostSearch';
|
||||
import { Range } from 'vs/workbench/api/common/extHostTypes';
|
||||
import { IFileMatch, IFileQuery, IPatternInfo, IRawFileMatch2, ISearchCompleteStats, ISearchQuery, ITextQuery, QueryType, resultIsMatch } from 'vs/workbench/services/search/common/search';
|
||||
import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol';
|
||||
import { TestLogService } from 'vs/workbench/test/workbenchTestServices';
|
||||
import * as vscode from 'vscode';
|
||||
import { NullLogService } from 'vs/platform/log/common/log';
|
||||
|
||||
let rpcProtocol: TestRPCProtocol;
|
||||
let extHostSearch: ExtHostSearch;
|
||||
let disposables: vscode.Disposable[] = [];
|
||||
const disposables = new DisposableStore();
|
||||
|
||||
let mockMainThreadSearch: MockMainThreadSearch;
|
||||
class MockMainThreadSearch implements MainThreadSearchShape {
|
||||
@@ -63,12 +63,12 @@ export function extensionResultIsMatch(data: vscode.TextSearchResult): data is v
|
||||
|
||||
suite('ExtHostSearch', () => {
|
||||
async function registerTestTextSearchProvider(provider: vscode.TextSearchProvider, scheme = 'file'): Promise<void> {
|
||||
disposables.push(extHostSearch.registerTextSearchProvider(scheme, provider));
|
||||
disposables.add(extHostSearch.registerTextSearchProvider(scheme, provider));
|
||||
await rpcProtocol.sync();
|
||||
}
|
||||
|
||||
async function registerTestFileSearchProvider(provider: vscode.FileSearchProvider, scheme = 'file'): Promise<void> {
|
||||
disposables.push(extHostSearch.registerFileSearchProvider(scheme, provider));
|
||||
disposables.add(extHostSearch.registerFileSearchProvider(scheme, provider));
|
||||
await rpcProtocol.sync();
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ suite('ExtHostSearch', () => {
|
||||
rpcProtocol = new TestRPCProtocol();
|
||||
|
||||
mockMainThreadSearch = new MockMainThreadSearch();
|
||||
const logService = new TestLogService();
|
||||
const logService = new NullLogService();
|
||||
|
||||
rpcProtocol.set(MainContext.MainThreadSearch, mockMainThreadSearch);
|
||||
|
||||
@@ -139,7 +139,7 @@ suite('ExtHostSearch', () => {
|
||||
});
|
||||
|
||||
teardown(() => {
|
||||
dispose(disposables);
|
||||
disposables.clear();
|
||||
return rpcProtocol.sync();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user