File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ const users = [
4444 askAgain : false ,
4545 } ,
4646] ;
47- const configPath = path . join ( process . cwd ( ) , 'exoframe.json' ) ;
47+ const cwd = process . cwd ( ) ;
48+ const folderName = path . basename ( cwd ) ;
49+ const configPath = path . join ( cwd , 'exoframe.json' ) ;
4850
4951const verifyBasicAuth = ( input , actual ) => {
5052 actual . split ( ',' ) . forEach ( ( element , index ) => {
@@ -148,7 +150,7 @@ test('Should generate config file for functions', done => {
148150 expect ( consoleSpy . args ) . toMatchSnapshot ( ) ;
149151 // then check config changes
150152 const cfg = yaml . safeLoad ( fs . readFileSync ( configPath , 'utf8' ) ) ;
151- expect ( cfg . name ) . toEqual ( 'exoframe-cli' ) ;
153+ expect ( cfg . name ) . toEqual ( folderName ) ;
152154 expect ( cfg . function ) . toEqual ( true ) ;
153155 // restore console
154156 console . log . restore ( ) ;
You can’t perform that action at this time.
0 commit comments