const fs = require("fs"); const path = require("path"); const reportPath = path.join(__dirname, "reports", "cucumber-html-report.html"); const cssToInject = ` `; fs.readFile(reportPath, "utf8", (err, data) => { if (err) throw err; const modified = data.replace("", `${cssToInject}`); fs.writeFile(reportPath, modified, "utf8", (err) => { if (err) throw err; console.log("Custom CSS injected successfully!"); }); });