filter data-workspace projects by ext (#14354)

* add filtering by project extension

* Fix tests

* addressing comments

* convert to lowercase
This commit is contained in:
Kim Santiago
2021-02-22 13:21:25 -08:00
committed by GitHub
parent f62889002d
commit 551eb76a42
7 changed files with 17 additions and 9 deletions

View File

@@ -550,7 +550,7 @@ describe('ProjectsController', function (): void {
const project2 = await Project.openProject(vscode.Uri.file(projPath2).fsPath);
const showErrorMessageSpy = sinon.spy(vscode.window, 'showErrorMessage');
const dataWorkspaceMock = TypeMoq.Mock.ofType<dataworkspace.IExtension>();
dataWorkspaceMock.setup(x => x.getProjectsInWorkspace()).returns(() => [vscode.Uri.file(project1.projectFilePath), vscode.Uri.file(project2.projectFilePath)]);
dataWorkspaceMock.setup(x => x.getProjectsInWorkspace(TypeMoq.It.isAny())).returns(() => [vscode.Uri.file(project1.projectFilePath), vscode.Uri.file(project2.projectFilePath)]);
sinon.stub(vscode.extensions, 'getExtension').returns(<any>{ exports: dataWorkspaceMock.object });
// add project reference from project1 to project2