diff --git a/src/vs/workbench/test/common/api/extHostApiCommands.test.ts b/src/vs/workbench/test/common/api/extHostApiCommands.test.ts index de7c5bd68c055b16552b2fb7856e3fc94a7922e2..756ccf1138e04c20fb582d37de42f43c0dc438ac 100644 --- a/src/vs/workbench/test/common/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/common/api/extHostApiCommands.test.ts @@ -123,7 +123,7 @@ suite('ExtHostLanguageFeatureCommands', function() { // }); }); - test('WorkspaceSymbols, ⇔ back and forth', function(done) { + test('WorkspaceSymbols, back and forth', function(done) { disposables.push(extHost.registerWorkspaceSymbolProvider({ provideWorkspaceSymbols(query): any { @@ -176,7 +176,7 @@ suite('ExtHostLanguageFeatureCommands', function() { // }); }); - test('Definition, ⇔ back and forth', function(done) { + test('Definition, back and forth', function(done) { disposables.push(extHost.registerDefinitionProvider(defaultSelector, { provideDefinition(doc: any): any { diff --git a/src/vs/workbench/test/common/api/testThreadService.ts b/src/vs/workbench/test/common/api/testThreadService.ts index 042f333afefe43ed0b6774d6c59256ec79af431e..7ced99e3b507c59524e78b693b73698806f34c10 100644 --- a/src/vs/workbench/test/common/api/testThreadService.ts +++ b/src/vs/workbench/test/common/api/testThreadService.ts @@ -6,10 +6,8 @@ 'use strict'; import {NullThreadService} from 'vs/platform/test/common/nullThreadService'; -import {create} from 'vs/base/common/types'; import {SyncDescriptor0} from 'vs/platform/instantiation/common/descriptors'; import {TPromise} from 'vs/base/common/winjs.base'; -import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation'; export class TestThreadService extends NullThreadService { @@ -21,10 +19,12 @@ export class TestThreadService extends NullThreadService { return this._callCountValue; } - private set _callCount(value:number) { + private set _callCount(value: number) { this._callCountValue = value; if (this._callCountValue === 0) { - this._completeIdle && this._completeIdle(); + if (this._completeIdle) { + this._completeIdle(); + } this._idle = undefined; } } @@ -49,18 +49,19 @@ export class TestThreadService extends NullThreadService { protected _registerAndInstantiateMainProcessActor(id: string, descriptor: SyncDescriptor0): T { - let _calls:{path: string; args: any[] }[] = []; + let _calls: {path: string; args: any[] }[] = []; let _instance: any; return this._getOrCreateProxyInstance({ - callOnRemote: (proxyId: string, path: string, args: any[]): TPromise => { this._callCount++; _calls.push({path, args}); - return TPromise.timeout(0).then(() => { + return new TPromise((c) => { + setTimeout(c, 0); + }).then(() => { if (!_instance) { _instance = this._instantiationService.createInstance(descriptor.ctor); } @@ -91,4 +92,4 @@ export class TestThreadService extends NullThreadService { } const Instance = new TestThreadService(); -export default Instance; \ No newline at end of file +export default Instance;