forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserviceRegistry.ts
More file actions
22 lines (19 loc) · 1.07 KB
/
serviceRegistry.ts
File metadata and controls
22 lines (19 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { IExtensionSingleActivationService } from '../../activation/types';
import { IServiceManager } from '../../ioc/types';
import { PYTEST_PROVIDER, UNITTEST_PROVIDER } from '../common/constants';
import { ITestFrameworkController, ITestController } from './common/types';
import { PythonTestController } from './controller';
import { PytestController } from './pytest/pytestController';
import { UnittestController } from './unittest/unittestController';
export function registerTestControllerTypes(serviceManager: IServiceManager): void {
serviceManager.addSingleton<ITestFrameworkController>(ITestFrameworkController, PytestController, PYTEST_PROVIDER);
serviceManager.addSingleton<ITestFrameworkController>(
ITestFrameworkController,
UnittestController,
UNITTEST_PROVIDER,
);
serviceManager.addSingleton<ITestController>(ITestController, PythonTestController);
serviceManager.addBinding(ITestController, IExtensionSingleActivationService);
}