문제

In xunit reporter of mocha, it generates the report for attributes tests, failures, skipped, error. but i want for mocha's pending, dropped and blocked reports also. is these reports are generated using xunit? can we customize the xunit reporter to generate the report which has

 pending
 dropped
 blocked

test cases report. please help me to find solution for this.

도움이 되었습니까?

해결책

Looks like this is a known issue and pending tests have been added to the xunit reporter.

First are you using the latest version of mocha?

https://github.com/visionmedia/mocha/pull/1051/files that pull request has been merged into the latest version of mocha and should including pending requests in xunit?

You can always fork mocha and edit lib/reporters/xunit.js and add

runner.on('dropped', function(test){
   tests.push(test);
});
runner.on('blocked', function(test){
   tests.push(test);
});

Or instead of forking mocha. Copy Xunit and make a custom mocha reporter. You can use https://github.com/startswithaj/mocha-spec-cov as a template.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top