Try to output JS test results in jUnit format for CircleCI

This commit is contained in:
Tautvidas Sipavičius
2016-08-24 21:44:22 +03:00
parent ff2c2ace86
commit c493de6569
2 changed files with 14 additions and 16 deletions

View File

@ -119,14 +119,23 @@ class RoboFile extends \Robo\Tasks {
)));
}
function testJavascript() {
function testJavascript($xml_output_file = null) {
$this->compileJs();
$this->_exec(join(' ', array(
$command = join(' ', array(
'./node_modules/.bin/mocha',
'-r tests/javascript/mochaTestHelper.js',
'tests/javascript/testBundles/**/*.js'
)));
));
if(!empty($xml_output_file)) {
$command .= sprintf(
' --reporter xunit --reporter-options output="%s"',
$xml_output_file
);
}
$this->_exec($command);
}
function testDebug() {