adamgruber / mochawesome

A Gorgeous HTML/CSS Reporter for Mocha.js
https://gitter.im/mochawesome/general
MIT License
1.06k stars 160 forks source link

Can not marge the mocha report which genrated in parallel test #384

Open wenJanus opened 1 year ago

wenJanus commented 1 year ago

Describe the bug A clear and concise description of what the bug is. When marge the repot file which generate by parallel test output, show some error: suites._timeout should be number beforeHooks/0/pending: Boolean

Code Reproduce Link to repo where the issue can reliably be reproduced:

Expected behavior Run command line: marge /project/reports/test/index.json --reportDir /project/reports/test --inline

Result: 18:04:17 + marge /project/reports/test/index.json --reportDir /project/reports/test --inline 18:04:17 Start to generate *** Test HTML Report. 18:04:17
18:04:17 ✘ Some files could not be processed: 18:04:17 /project/reports/test/index.json 18:04:17 Invalid value null supplied to /results/1/suites/0/_timeout: Number 18:04:17 Invalid value null supplied to /results/1/suites/0/beforeHooks/0/pending: Boolean 18:04:17 Invalid value null supplied to /results/1/suites/0/afterHooks/0/pending: Boolean 18:04:17 Invalid value null supplied to /results/1/suites/1/_timeout: Number 18:04:17 Invalid value null supplied to /results/1/suites/2/_timeout: Number

cat index.json | grep "_timeout" "_timeout": 120000 "_timeout": 2000 "_timeout": null "_timeout": null "_timeout": null "_timeout": null "_timeout": null "_timeout": null "_timeout": null

cat index.json | grep "pending" "pending": 0, "pendingPercent": 0, "pending": false, "pending": false, "pending": false, "pending": false, "pending": false, "pending": [], "pending": [], "pending": null, "pending": null, "pending": false, "pending": false,

Screenshots If applicable, add screenshots to help explain your problem. image

Environment (please complete the following information):

Additional context Add any other context about the problem here.