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 = [
44
44
askAgain : false ,
45
45
} ,
46
46
] ;
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' ) ;
48
50
49
51
const verifyBasicAuth = ( input , actual ) => {
50
52
actual . split ( ',' ) . forEach ( ( element , index ) => {
@@ -148,7 +150,7 @@ test('Should generate config file for functions', done => {
148
150
expect ( consoleSpy . args ) . toMatchSnapshot ( ) ;
149
151
// then check config changes
150
152
const cfg = yaml . safeLoad ( fs . readFileSync ( configPath , 'utf8' ) ) ;
151
- expect ( cfg . name ) . toEqual ( 'exoframe-cli' ) ;
153
+ expect ( cfg . name ) . toEqual ( folderName ) ;
152
154
expect ( cfg . function ) . toEqual ( true ) ;
153
155
// restore console
154
156
console . log . restore ( ) ;
You can’t perform that action at this time.
0 commit comments