Recently started working on a project where AdonisJS is used and I am trying to beef up the test coverage.
Followed the documentation and setup the .env.testing file
HOST=knab-54-api
PORT=4021
NODE_ENV=testing
DB_CONNECTION=pg
DB_HOST=knab-54-api_postgres_1
DB_PORT=5432
DB_USER=knab54api
DB_PASSWORD=knab4api
DB_DATABASE=knab54api-test
Also updated the vowfile.js file
// Uncomment when want to run migrations
const ace = require('@adonisjs/ace')
await ace.call('migration:run', {}, { silent: true })
await ace.call('migration:reset', {}, { silent: true })
As far as setup goes, that should be all you need right?
However, when I run a test, only the adonis_schema table is created in the database, none of the migrations appear to run, but I always get a migration success message
Database migrated successfully in 5.82 s