Cannot read poperty 'suites' of undefined
tpronk opened this issue · 3 comments
tpronk commented
Hey!
I'm a bit inexperienced, so please be gentle :).
Using version 2.0.0, I followed the steps in the README to write the json logs to individual files and then merge them together:
reporters: [
'dot',
['json',{
outputDir: './Results'
}]
],
const mergeResults = require('wdio-json-reporter/mergeResults')
mergeResults('./Results', 'wdio-json-*', 'wdio-custom-filename.json')
I got an error "cannot read property suites of undefined". Diving a bit deeper, I spotted that the filenames are named "wdio-0-0-json-reporter.log" etc., so I could fix it by changing the script above to...
const mergeResults = require('wdio-json-reporter/mergeResults')
mergeResults('./Results', 'wdio-*', 'wdio-custom-filename.json')
fijijavis commented
@tpronk It looks like you have found an error in the documentation. Thanks for letting me know!
tpronk commented
Happy to help!
github-actions commented
Stale issue message