In my test environment I'm using mocha as my test runner. I have configured the NODE_ENV as "test" in a setup.js file which I configured to run with mocha on start up using
mocha --require setup.js
I am using sequelize as my ORM and I want it to init with the force flag set to true. Where should I execute the sync function?
import models from '../src/data/models';
models.sync({
force: true
});
Since it is an async function, the tests may start before the syncing stage finished.