nyc
nyc copied to clipboard
nyc merge for large number of files throws "Invalid string length" error
We run 20+ parallel runs of cypress that generate 20 different coverage${ID}-final.json
stored in cypress/coverage
Expected Behavior
$(npm bin)/nyc merge cypress/coverage cypress/coverage/coverage-final.json
should merge them into a single coverage file without issue.
Observed Behavior
$(npm bin)/nyc merge cypress/coverage cypress/coverage/coverage-final.json
throws this error:
RangeError: Invalid string length
Likely issue
Might be happening due to https://github.com/nodejs/node/issues/35973 and thus lowering the number of runs to 14 works as the size of the json is lower than 500MB