Skip to content

Commit

Permalink
Remove code lenses used in tests (microsoft#16200)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Jul 26, 2021
1 parent b25a8c5 commit 9105b0f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 525 deletions.
27 changes: 0 additions & 27 deletions src/client/testing/codeLenses/main.ts

This file was deleted.

321 changes: 0 additions & 321 deletions src/client/testing/codeLenses/testFiles.ts

This file was deleted.

21 changes: 1 addition & 20 deletions src/client/testing/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { IInterpreterService } from '../interpreter/contracts';
import { IServiceContainer } from '../ioc/types';
import { EventName } from '../telemetry/constants';
import { captureTelemetry, sendTelemetryEvent } from '../telemetry/index';
import { activateCodeLenses } from './codeLenses/main';
import { CANCELLATION_REASON } from './common/constants';
import { selectTestWorkspace } from './common/testUtils';
import { TestSettingsPropertyNames } from './configuration/types';
Expand Down Expand Up @@ -103,7 +102,7 @@ export class UnitTestManagementService implements ITestManagementService, Dispos
public get onDidStatusChange(): Event<WorkspaceTestStatus> {
return this._onDidStatusChange.event;
}
public async activate(symbolProvider: DocumentSymbolProvider): Promise<void> {
public async activate(): Promise<void> {
if (this.activatedOnce) {
return;
}
Expand All @@ -117,7 +116,6 @@ export class UnitTestManagementService implements ITestManagementService, Dispos
this.autoDiscoverTests(undefined).catch((ex) =>
traceError('Failed to auto discover tests upon activation', ex),
);
await this.registerSymbolProvider(symbolProvider);
}
public async getTestManager(
displayTestNotConfiguredMessage: boolean,
Expand Down Expand Up @@ -432,23 +430,6 @@ export class UnitTestManagementService implements ITestManagementService, Dispos
await promise;
}

public async registerSymbolProvider(symbolProvider: DocumentSymbolProvider): Promise<void> {
const testCollectionStorage = this.serviceContainer.get<ITestCollectionStorageService>(
ITestCollectionStorageService,
);
const event = new EventEmitter<void>();
this.disposableRegistry.push(event);
const handler = this._onDidStatusChange.event((e) => {
if (e.status !== TestStatus.Discovering && e.status !== TestStatus.Running) {
event.fire();
}
});
this.disposableRegistry.push(handler);
this.disposableRegistry.push(
activateCodeLenses(event, symbolProvider, testCollectionStorage, this.serviceContainer),
);
}

@captureTelemetry(EventName.UNITTEST_CONFIGURE, undefined, false)
public async configureTests(resource?: Uri) {
let wkspace: Uri | undefined;
Expand Down
Loading

0 comments on commit 9105b0f

Please sign in to comment.