File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,8 +66,7 @@ export async function selectInstall(): Promise<boolean> {
6666
6767export async function getProjectName ( ) : Promise < string > {
6868 const value = await text ( {
69- message : 'What would you like to name your project?' ,
70- placeholder : 'Leave empty to initialize in the current directory' ,
69+ message : 'Project name (leave empty to use current directory)' ,
7170 validate ( value ) {
7271 if ( isCurrentDirectoryProjectNameInput ( value ) ) {
7372 return
Original file line number Diff line number Diff line change @@ -34,14 +34,16 @@ describe('getProjectName', () => {
3434
3535 const projectName = await getProjectName ( )
3636 const textOptions = textSpy . mock . calls [ 0 ] ! [ 0 ] as {
37+ message ?: string
3738 placeholder ?: string
3839 validate ?: ( value : string ) => string | undefined
3940 }
4041
4142 expect ( projectName ) . toBe ( '' )
42- expect ( textOptions . placeholder ) . toBe (
43- 'Leave empty to initialize in the current directory' ,
43+ expect ( textOptions . message ) . toBe (
44+ 'Project name (leave empty to use current directory) ' ,
4445 )
46+ expect ( textOptions . placeholder ) . toBeUndefined ( )
4547 expect ( textOptions . validate ?.( '' ) ) . toBeUndefined ( )
4648 expect ( textOptions . validate ?.( '.' ) ) . toBeUndefined ( )
4749 } )
You can’t perform that action at this time.
0 commit comments