// after all tests remove test folders and delete the database: after(function (callback) { const tempFolders = [ path.resolve(process.cwd(), 'node_modules/we-plugin-post'), projectPath + '/files/config', projectPath + '/files/uploads', projectPath + '/database.sqlite', projectPath + '/files/templatesCacheBuilds.js' ]; async.each(tempFolders, (folder, next)=> { deleteDir( folder, next); }, (err)=> { if (err) throw new Error(err); we.exit(callback); }); });