@@ -35,7 +35,7 @@ module.exports.test = function (genPath) {
3535 type : 'input' ,
3636 name : 'feature' ,
3737 message : 'Feature which is being tested (ex: account, login, etc)' ,
38- validate : ( val ) => ! ! val ,
38+ validate : val => ! ! val ,
3939 } ,
4040 {
4141 type : 'input' ,
@@ -46,7 +46,7 @@ module.exports.test = function (genPath) {
4646 } ,
4747 } ,
4848 ] )
49- . then ( ( result ) => {
49+ . then ( result => {
5050 const testFilePath = path . dirname ( path . join ( testsPath , config . tests ) ) . replace ( / \* \* $ / , '' )
5151 let testFile = path . join ( testFilePath , result . filename )
5252 const ext = path . extname ( testFile )
@@ -63,9 +63,7 @@ module.exports.test = function (genPath) {
6363 testContent = testContent . replace ( '{{actor}}' , container . translation ( ) . I )
6464 if ( vocabulary . contexts . Feature ) testContent = testContent . replace ( 'Feature' , vocabulary . contexts . Feature )
6565 if ( vocabulary . contexts . Scenario ) testContent = testContent . replace ( 'Scenario' , vocabulary . contexts . Scenario )
66- output . print (
67- `Test was created in ${ colors . bold ( config . translation ) } localization. See: https://codecept.io/translation/` ,
68- )
66+ output . print ( `Test was created in ${ colors . bold ( config . translation ) } localization. See: https://codecept.io/translation/` )
6967 } else {
7068 testContent = testContent . replace ( '{{actor}}' , 'I' )
7169 }
@@ -128,13 +126,13 @@ module.exports.pageObject = function (genPath, opts) {
128126 type : 'input' ,
129127 name : 'name' ,
130128 message : `Name of a ${ kind } object` ,
131- validate : ( val ) => ! ! val ,
129+ validate : val => ! ! val ,
132130 } ,
133131 {
134132 type : 'input' ,
135133 name : 'filename' ,
136134 message : 'Where should it be stored' ,
137- default : ( answers ) => `./${ kind } s/${ answers . name } .${ extension } ` ,
135+ default : answers => `./${ kind } s/${ answers . name } .${ extension } ` ,
138136 } ,
139137 {
140138 type : 'list' ,
@@ -144,7 +142,7 @@ module.exports.pageObject = function (genPath, opts) {
144142 default : 'module' ,
145143 } ,
146144 ] )
147- . then ( ( result ) => {
145+ . then ( result => {
148146 const pageObjectFile = path . join ( testsPath , result . filename )
149147 const dir = path . dirname ( pageObjectFile )
150148 if ( ! fileExists ( dir ) ) fs . mkdirSync ( dir )
@@ -194,9 +192,7 @@ module.exports.pageObject = function (genPath, opts) {
194192 try {
195193 generateDefinitions ( testsPath , { } )
196194 } catch ( _err ) {
197- output . print (
198- `Run ${ colors . green ( 'npx codeceptjs def' ) } to update your types to get auto-completion for object.` ,
199- )
195+ output . print ( `Run ${ colors . green ( 'npx codeceptjs def' ) } to update your types to get auto-completion for object.` )
200196 }
201197 } )
202198}
@@ -241,16 +237,16 @@ module.exports.helper = function (genPath) {
241237 type : 'input' ,
242238 name : 'name' ,
243239 message : 'Name of a Helper' ,
244- validate : ( val ) => ! ! val ,
240+ validate : val => ! ! val ,
245241 } ,
246242 {
247243 type : 'input' ,
248244 name : 'filename' ,
249245 message : 'Where should it be stored' ,
250- default : ( answers ) => `./${ answers . name . toLowerCase ( ) } _helper.${ extension } ` ,
246+ default : answers => `./${ answers . name . toLowerCase ( ) } _helper.${ extension } ` ,
251247 } ,
252248 ] )
253- . then ( ( result ) => {
249+ . then ( result => {
254250 const name = ucfirst ( result . name )
255251 const helperFile = path . join ( testsPath , result . filename )
256252 const dir = path . dirname ( helperFile )
0 commit comments