galonku / galonku-backend

Back-End section for Galonku
https://galonku.herokuapp.com
MIT License
4 stars 3 forks source link

Solve debug Jest test using Sequelize #51

Closed mhaidarhanif closed 6 years ago

mhaidarhanif commented 6 years ago

Use:

beforeAll(() => {
  models.sequelize.sync().then(() => {
    models.sequelize.close()
  })
})

afterAll(async () => {
  await models.sequelize.dropAllSchemas({})
})