Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
SOD/test/utils/wipeDatabase.js

8 lines
223 B
JavaScript

async function wipeDatabase(models) {
for (let model in models) {
if (["sequelize", "Sequelize"].indexOf(model) < 0)
await models[model].destroy({where: {}});
}
}
module.exports = wipeDatabase;