Skip to content
Snippets Groups Projects
Commit 1f17548c authored by Antoine Lambert's avatar Antoine Lambert
Browse files

nyc.config.js: Also set custom value for temp-dir option

It enables to modify another code coverage output directory when running
cypress tests in parallel and thus avoid race conditions when multiple
cypress processes try to write to the same coverage output file.
parent 87030b2a
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ dist/
package-lock.json
yarn-error.log
cypress/mochawesome/
.nyc_output/
.nyc_output*/
cypress/coverage*/
cypress/fixtures/source*.json
cypress/junit/
......
'use strict';
let reportDir = 'cypress/coverage';
let tempDir = '.nyc_output';
const parallelBuildId = process.env.CYPRESS_PARALLEL_BUILD_ID;
if (parallelBuildId !== undefined) {
reportDir += parallelBuildId;
tempDir += parallelBuildId;
}
module.exports = {
......@@ -11,5 +13,6 @@ module.exports = {
'assets/src/bundles/vendors/index.js',
'assets/src/thirdparty/**/*.js'
],
'report-dir': reportDir
'report-dir': reportDir,
'temp-dir': tempDir
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment