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

9 lines
223 B
JavaScript
Raw Normal View History

2020-08-18 15:45:49 +02:00
async function wipeDatabase(models) {
for (let model in models) {
if (["sequelize", "Sequelize"].indexOf(model) < 0)
await models[model].destroy({where: {}});
}
}
module.exports = wipeDatabase;