I am running Cypress on a Windows machine.
I am using this command (included in the package.json file) to remove the cypress/reports folder before the start of each test run:
"clean:reports": "IF EXIST 'cypress\\reports'(rmdir /Q /S cypress\\reports) && mkdir cypress\\reports\\ && mkdir cypress\\reports\\mocha\\ && mkdir cypress\\reports\\mochareports\\"
Upon analysis, I've seen that the cypress/reports folder which stores the test report folder does not get deleted even after the above mentioned script executes.
Am I using the correct command? What command should I use to ensure that the system checks for the cypress/reports folder to be present, and if yes deletes it successfully?
rimraf
is cross-platform, why not use something like that?