Files
SCM-Manager/scm-ui/e2e-tests/src/index.js

23 lines
489 B
JavaScript
Raw Normal View History

2020-08-26 08:48:43 +02:00
const cypress = require("cypress");
const fs = require("fs");
const path = require("path");
const options = {
reporter: "junit",
reporterOptions: {
mochaFile: path.join("..", "target", "cypress-reports", "TEST-[hash].xml")
}
};
cypress
.run(options)
.then(results => {
results.runs.forEach(run => {
// remove videos of successful runs
if (!run.shouldUploadVideo) {
fs.unlinkSync(run.video);
}
});
})
.catch(err => console.error(err));