UNPKG

artes

Version:

The simplest way to automate UI and API tests using Cucumber-style steps.

25 lines (20 loc) 489 B
const { moduleConfig } = require("../imports/commons"); const fs = require("fs"); const path = require("path"); function cleanUp() { try { for (const p of moduleConfig.cleanUpPaths) { const fullPath = path.join(moduleConfig.modulePath, p); fs.rmSync(fullPath, { recursive: true, force: true, }); } } catch (error) { console.error("❌ Error in cleanup:", error.message); process.env.EXIT_CODE = 1; } } module.exports = { cleanUp };