Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function() {
/** After each test clean up data that was injected into the database */
event.dispatcher.on(event.test.after, async (test) => {
try{
// Remove any and all data that was injected into the DB
// after each test
await Apis.cleanUp();
} catch (err) {
// eslint-disable-next-line angular/log
console.log(`The following error was thrown while cleaning up injected data: ${err}`);
}
});
};