Skip to content

Commit

Permalink
fix(configure): add commands to the rc file (#954)
Browse files Browse the repository at this point in the history
* fix(configure): add commands to the rc file

* test(configure): add assertion that commands have been added
  • Loading branch information
RomainLanz committed Sep 21, 2023
1 parent 9e89c0d commit d0b37b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export async function configure(command: Configure) {
* Register provider
*/
await codemods.updateRcFile((rcFile) => {
rcFile.addCommand('@adonisjs/lucid/commands')
rcFile.addProvider('@adonisjs/lucid/database_provider')
})

Expand Down
1 change: 1 addition & 0 deletions test/configure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ test.group('Configure', (group) => {

await assert.fileExists('config/database.ts')
await assert.fileExists('adonisrc.ts')
await assert.fileContains('adonisrc.ts', '@adonisjs/lucid/commands')
await assert.fileContains('adonisrc.ts', '@adonisjs/lucid/database_provider')
await assert.fileContains('config/database.ts', 'defineConfig({')

Expand Down

0 comments on commit d0b37b2

Please sign in to comment.