taras42 / karma-jasmine-html-reporter

A Karma plugin. Dynamically displays tests results at debug.html page
MIT License
44 stars 17 forks source link

Reason for pending could be reported #22

Open marcusreese opened 7 years ago

marcusreese commented 7 years ago

As the Jasmine docs mention, calling pending('<your reason here>') in a spec causes it not to run.

The reason is being sent to html.jasmine.reporter.js but never printed to the screen.

The fix would be simple. Like the following:

Around line 203:

var description = resultNode.result.description;
var pendingReason = resultNode.result.pendingReason;
var fullDescription = pendingReason ? description + ' (' + pendingReason + ')' : description;

Then on what was line 206, just replace resultNode.result.description with fullDescription.

Would you like to do this? Or would you like me to create a pull request? Or none of the above?