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.
letu/test/utils/wipeDatabase.js

9 lines
223 B
JavaScript
Raw Permalink Normal View History

2020-06-08 12:20:17 +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;