Merge pull request #147 from prettycode/master
Option to allow specifying a junitTemplate
This commit is contained in:
commit
21647b8bc8
@ -360,7 +360,7 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function writeJunitXml(testsuites){
|
function writeJunitXml(testsuites){
|
||||||
var template = grunt.file.read(junitTemplate);
|
var template = grunt.file.read(options.junit.template || junitTemplate);
|
||||||
if (options.junit.consolidate) {
|
if (options.junit.consolidate) {
|
||||||
var xmlFile = path.join(options.junit.path, 'TEST-' + testsuites.suite1.name.replace(/[^\w]/g, '') + '.xml');
|
var xmlFile = path.join(options.junit.path, 'TEST-' + testsuites.suite1.name.replace(/[^\w]/g, '') + '.xml');
|
||||||
grunt.file.write(xmlFile, grunt.util._.template(template, { testsuites: _.values(testsuites)}));
|
grunt.file.write(xmlFile, grunt.util._.template(template, { testsuites: _.values(testsuites)}));
|
||||||
|
Loading…
Reference in New Issue
Block a user