fix the extension dependency issue (#12347)

This commit is contained in:
Alan Ren
2020-09-18 09:49:18 -07:00
committed by GitHub
parent 2162e2f50c
commit 54b5390d03
6 changed files with 19 additions and 55 deletions

View File

@@ -1,27 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'mocha';
import * as should from 'should';
import { DataWorkspaceExtension } from '../dataWorkspaceExtension';
import { createProjectProvider } from './projectProviderRegistry.test';
import { ProjectProviderRegistry } from '../common/projectProviderRegistry';
suite('DataWorkspaceExtension Tests', function (): void {
test('register and unregister project provider through the extension api', async () => {
const extension = new DataWorkspaceExtension();
const provider = createProjectProvider([
{
projectFileExtension: 'testproj',
icon: '',
displayName: 'test project'
}
]);
const disposable = extension.registerProjectProvider(provider);
should.strictEqual(ProjectProviderRegistry.providers.length, 1, 'project provider should have been registered');
disposable.dispose();
should.strictEqual(ProjectProviderRegistry.providers.length, 0, 'there should be nothing in the ProjectProviderRegistry');
});
});