mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
Fix tests
This commit is contained in:
parent
d1fdc9636e
commit
78cbcc5cc0
2 changed files with 6 additions and 2 deletions
|
@ -50,7 +50,7 @@ suite('QueryBuilder', () => {
|
||||||
|
|
||||||
instantiationService.stub(IWorkspaceContextService, mockContextService);
|
instantiationService.stub(IWorkspaceContextService, mockContextService);
|
||||||
instantiationService.stub(IEnvironmentService, TestEnvironmentService);
|
instantiationService.stub(IEnvironmentService, TestEnvironmentService);
|
||||||
instantiationService.stub(IRemotePathService, TestRemotePathService);
|
instantiationService.stub(IRemotePathService, new TestRemotePathService(TestEnvironmentService));
|
||||||
|
|
||||||
queryBuilder = instantiationService.createInstance(QueryBuilder);
|
queryBuilder = instantiationService.createInstance(QueryBuilder);
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,6 +11,8 @@ import { ISearchPathsInfo, QueryBuilder } from 'vs/workbench/contrib/search/comm
|
||||||
import { TestEnvironmentService } from 'vs/workbench/test/electron-browser/workbenchTestServices';
|
import { TestEnvironmentService } from 'vs/workbench/test/electron-browser/workbenchTestServices';
|
||||||
import { assertEqualSearchPathResults, getUri, patternsToIExpression, globalGlob, fixPath } from 'vs/workbench/contrib/search/test/browser/queryBuilder.test';
|
import { assertEqualSearchPathResults, getUri, patternsToIExpression, globalGlob, fixPath } from 'vs/workbench/contrib/search/test/browser/queryBuilder.test';
|
||||||
import { TestContextService } from 'vs/workbench/test/common/workbenchTestServices';
|
import { TestContextService } from 'vs/workbench/test/common/workbenchTestServices';
|
||||||
|
import { TestRemotePathService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||||
|
import { IRemotePathService } from 'vs/workbench/services/path/common/remotePathService';
|
||||||
|
|
||||||
const DEFAULT_EDITOR_CONFIG = {};
|
const DEFAULT_EDITOR_CONFIG = {};
|
||||||
const DEFAULT_USER_CONFIG = { useRipgrep: true, useIgnoreFiles: true, useGlobalIgnoreFiles: true };
|
const DEFAULT_USER_CONFIG = { useRipgrep: true, useIgnoreFiles: true, useGlobalIgnoreFiles: true };
|
||||||
|
@ -25,7 +27,7 @@ suite('QueryBuilder', () => {
|
||||||
let mockContextService: TestContextService;
|
let mockContextService: TestContextService;
|
||||||
let mockWorkspace: Workspace;
|
let mockWorkspace: Workspace;
|
||||||
|
|
||||||
setup(() => {
|
setup(async () => {
|
||||||
instantiationService = new TestInstantiationService();
|
instantiationService = new TestInstantiationService();
|
||||||
|
|
||||||
mockConfigService = new TestConfigurationService();
|
mockConfigService = new TestConfigurationService();
|
||||||
|
@ -39,8 +41,10 @@ suite('QueryBuilder', () => {
|
||||||
|
|
||||||
instantiationService.stub(IWorkspaceContextService, mockContextService);
|
instantiationService.stub(IWorkspaceContextService, mockContextService);
|
||||||
instantiationService.stub(IEnvironmentService, TestEnvironmentService);
|
instantiationService.stub(IEnvironmentService, TestEnvironmentService);
|
||||||
|
instantiationService.stub(IRemotePathService, new TestRemotePathService(TestEnvironmentService));
|
||||||
|
|
||||||
queryBuilder = instantiationService.createInstance(QueryBuilder);
|
queryBuilder = instantiationService.createInstance(QueryBuilder);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 5)); // Wait for RemotePathService.userHome to resolve
|
||||||
});
|
});
|
||||||
|
|
||||||
suite('parseSearchPaths', () => {
|
suite('parseSearchPaths', () => {
|
||||||
|
|
Loading…
Reference in a new issue