Show multiple expect failures
See original GitHub issueJasmine provides multiple expect failures to the report, however, the report is currently only showing the first failure. This isn’t really helpful since we want to see all of our expect failures, right? That’s why we put them there.
I was able to find where the issue is, in index.js:
Here it is only grabbing the first in the failedExpectations array.
metaData.message = (results.failedExpectations[0] || {}).message || 'Failed';
Instead, something like the below can be implemented (you can do the same with .stack
):
if (results.failedExpectations[0].message) {
metaData.message = results.failedExpectations.map(result => result.message);
} else {
metaData.message = 'Failed';
}
This might not be the cleanest way, I’m still pretty new to JavaScript, but I figured this would at least be a good starting point for whoever would work on this. I can also work on this and create a PR, however, it might take me a bit to learn how it works, make sure it works, get time, etc. So, I figured I put this here incase someone can get to it much faster.
Thanks for your time!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top GitHub Comments
In the meantime you could use it directly from git (if your team and your company firewall allows it) by using:
"protractor-beautiful-reporter": "git+https://github.com/Evilweed/protractor-beautiful-reporter.git"
, in your thedevDependencies
section of yourpackage.json
@Brian-Dawson-Nerdery did not notice that Evilweed did the npm release on 25 August already… so closing this now
Fix was released on 25. Aug. 2018 on v1.2.5.