Prompts user for desired action when autorest is not installed (#17305)

* Giving user option to install autorest globally or run via npx

* Adds message for when no files are generated (no models in spec)

* Adding test

* Reinstating the rest of the test suite

* PR feedback

* Fixing tests to stub new prompt when test runner doesn't have autorest installed

* PR feedback

* fix typo

* fix typo
This commit is contained in:
Benjin Dubishar
2021-10-15 13:26:58 -07:00
committed by GitHub
parent 7b66acd58b
commit 901b90317c
5 changed files with 62 additions and 14 deletions

View File

@@ -704,6 +704,7 @@ describe('ProjectsController', function (): void {
projController.setup(x => x.generateAutorestFiles(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(async () => {
await testUtils.createDummyFileStructure(true, fileList, newProjFolder);
await testUtils.createTestFile('SELECT \'This is a post-deployment script\'', constants.autorestPostDeploymentScriptName, newProjFolder);
return 'some dummy console output';
});
projController.setup(x => x.openProjectInWorkspace(TypeMoq.It.isAny())).returns(async () => { });