forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserviceRegistry.unit.test.ts
More file actions
29 lines (24 loc) · 1.02 KB
/
serviceRegistry.unit.test.ts
File metadata and controls
29 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { instance, mock, verify } from 'ts-mockito';
import { IExtensionSingleActivationService } from '../../client/activation/types';
import { ServiceManager } from '../../client/ioc/serviceManager';
import { IServiceManager } from '../../client/ioc/types';
import { CodeActionProviderService } from '../../client/providers/codeActionProvider/main';
import { registerTypes } from '../../client/providers/serviceRegistry';
suite('Common Providers Service Registry', () => {
let serviceManager: IServiceManager;
setup(() => {
serviceManager = mock(ServiceManager);
});
test('Ensure services are registered', async () => {
registerTypes(instance(serviceManager));
verify(
serviceManager.addSingleton<IExtensionSingleActivationService>(
IExtensionSingleActivationService,
CodeActionProviderService,
),
).once();
});
});