cucumber-junit
cucumber-junit copied to clipboard
Cannot read property 'length' of undefined
Getting this when trying to run ./node_modules/.bin/cucumber-junit > tests/features/cucumber_report.xml
\node_modules\protractor-cucumber-junit\lib\cucumber_junit.js:24
var lastAssert = stepJson.assertions.length - 1;
^
Cannot read property 'length' of undefined
What I'm doing wrong?
see if you can use ./node_modules/.bin/cucumber-junit-enhance file instead of ./node_modules/.bin/cucumber-junit
What is cucumber-junit-enhance
?
Hit the same error.
@stjohnjohnson what the poster means is run this instead
./node_modules/.bin/cucumber-junit-enhance > tests/features/cucumber_report.xml
I did this and it worked.
@stjohnjohnson to elaborate, it looks like the OP and @jperkns, like me, got here via protractor-cucumber-junit, which appears to be a fork of cucumber-junit
for protractor support.