mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 10:16:16 +01:00
23 lines
489 B
JavaScript
23 lines
489 B
JavaScript
|
|
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));
|