File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ export default class Configure extends BaseCommand {
145
145
} ,
146
146
] ,
147
147
} )
148
+ rcFile . addProvider ( '@japa/preset-adonis/TestsProvider' )
148
149
149
150
rcFile . commit ( )
150
151
logger . action ( 'update' ) . succeeded ( '.adonisrc.json' )
@@ -167,6 +168,30 @@ export default class Configure extends BaseCommand {
167
168
logger . action ( 'create' ) . succeeded ( '.env.test' )
168
169
}
169
170
171
+ /**
172
+ * Update "tsconfig.json"
173
+ */
174
+ const tsConfig = new files . JsonFile ( this . application . appRoot , 'tsconfig.json' )
175
+ const existingTypes = tsConfig . get ( 'compilerOptions.types' ) || [ ]
176
+
177
+ if ( ! existingTypes . includes ( '@japa/preset-adonis/build/adonis-typings' ) ) {
178
+ existingTypes . push ( '@japa/preset-adonis/build/adonis-typings' )
179
+ }
180
+ tsConfig . set ( 'compilerOptions.types' , existingTypes )
181
+
182
+ tsConfig . commit ( )
183
+ logger . action ( 'update' ) . succeeded ( 'tsconfig.json' )
184
+
185
+ /**
186
+ * Set additional .env variables for "web" boilerplate
187
+ */
188
+ if ( this . appType === 'web' ) {
189
+ testEnvFile . add ( [ 'ASSETS_DRIVER=fake' , 'SESSION_DRIVER=memory' ] )
190
+ }
191
+
192
+ testEnvFile . commit ( )
193
+ logger . action ( 'create' ) . succeeded ( '.env.test' )
194
+
170
195
/**
171
196
* Install required dependencies
172
197
*/
You can’t perform that action at this time.
0 commit comments