javascript - Use multiple reporters in Mocha browser? -


is possible use multiple reporters in browser version of mocha? i'm creating reporter sends test results server still want use default html reporter mocha defaults to. right i'm modifying source code work. know mocha uses commonjs it's reporters too.

mocha.run returns runner object emits useful events such 'test end' , 'suite end'. therefore, can this:

mocha.run() .on('test end', function(test) {   if ('passed' === test.state) {     console.log('passed!', test.title)   } else if (test.pending) {     console.log('pending!', test.title)   } else {     console.log('fail!', test.title)     let err = test.err     console.log(err)   }   // logic collect results }) .on('suite end', function(suite) {   if (suite.root) {     // logic send collected results server   } }) 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -