File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
awsService/appBuilder/serverlessLand
test/awsService/appBuilder/serverlessLand Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export async function downloadPatternCode(config: CreateServerlessLandWizardForm
101101 'No'
102102 )
103103 if ( choice !== 'Yes' ) {
104- return Promise . reject ( new ToolkitError ( `A folder named ${ config . name } already exists in this path.` ) )
104+ throw new ToolkitError ( `Folder already exists: ${ config . name } ` )
105105 }
106106 await vscode . workspace . fs . delete ( location )
107107 }
Original file line number Diff line number Diff line change @@ -156,9 +156,9 @@ describe('downloadPatternCode', () => {
156156 } )
157157 try {
158158 await Promise . all ( [ messagePromise , downloadPatternCode ( mockConfig , mockConfig . assetName ) ] )
159- assert . fail ( 'A folder named test-project already exists in this path. ' )
159+ assert . fail ( 'Folder already exists: test-project' )
160160 } catch ( e ) {
161- assert . strictEqual ( ( e as Error ) . message , `A folder named ${ mockConfig . name } already exists in this path. ` )
161+ assert . strictEqual ( ( e as Error ) . message , `Folder already exists: ${ mockConfig . name } ` )
162162 }
163163 assert ( getPatternStub . notCalled )
164164 existsStub . restore ( )
You can’t perform that action at this time.
0 commit comments