I have some scripts in package.json as
"scripts": {
"report:deleteOldReport": "node deleteReports.js",
"runCypress": "npx cypress run",
"report:merge": "mochawesome-merge ./cypress/reports/*.json -o ./cypress/report_Merged/totalReport.json",
"report:generateHtml": "marge ./cypress/report_Merged/totalReport.json --reportDir ./ --inline",
"regressionScripts": "npm-run-all -s -c report:deleteOldReport runCypress report:merge report:generateHtml"
}
I run it using command npm run regressionScripts
and it works well.
Sometimes I need to pass a parameter --spec /path/tosome/files
to the runCypress
script. Meaning I want the second script to be executed as npx cypress run --spec /path/to/some/files
. I can run the script like npm run runCypress -- --spec /path/to/some/files
and it works fine.
The question is how to pass the --spec
parameter through npm-run-all
command?