index.js
function (data) {
    this.data.elapsedTime = data.elapsedTime;
    this.data.status = data.status;
    this.data.assertions = data.assertions;
    this.data.assertionsFailed = data.assertionsFailed;
    this.data.assertionsPassed = data.assertionsPassed;

    var contents = jsonxml(this.xml, {escape: true, removeIllegalNameCharacters: true, prettyPrint: true, xmlHeader: 'version="1.0" encoding="UTF-8"'});

    if (path.extname(this.dest) !== '.xml') {
      this.dest = this.dest + '/dalek.xml';
    }

    this.events.emit('report:written', {type: 'junit', dest: this.dest});
    this._recursiveMakeDirSync(path.dirname(this.dest.replace(path.basename(this.dest, ''))));
    fs.writeFileSync(this.dest, contents, 'utf8');
  }
function (data) {
    this.data.elapsedTime = data.elapsedTime;
    this.data.status = data.status;
    this.data.assertions = data.assertions;
    this.data.assertionsFailed = data.assertionsFailed;
    this.data.assertionsPassed = data.assertionsPassed;

    var contents = jsonxml(this.xml, {escape: true, removeIllegalNameCharacters: true, prettyPrint: true, xmlHeader: 'version="1.0" encoding="UTF-8"'});

    if (path.extname(this.dest) !== '.xml') {
      this.dest = this.dest + '/dalek.xml';
    }

    this.events.emit('report:written', {type: 'junit', dest: this.dest});
    this._recursiveMakeDirSync(path.dirname(this.dest.replace(path.basename(this.dest, ''))));
    fs.writeFileSync(this.dest, contents, 'utf8');
  }
function ( data ) { this . data . elapsedTime = data . elapsedTime ; this . data . status = data . status ; this . data . assertions = data . assertions ; this . data . assertionsFailed = data . assertionsFailed ; this . data . assertionsPassed = data . assertionsPassed ; var contents = jsonxml ( this . xml , { escape : true , removeIllegalNameCharacters : true , prettyPrint : true , xmlHeader : 'version="1.0" encoding="UTF-8"' } ) ; if ( path . extname ( this . dest ) !== '.xml' ) { this . dest = this . dest + '/dalek.xml' ; } this . events . emit ( 'report:written' , { type : 'junit' , dest : this . dest } ) ; this . _recursiveMakeDirSync ( path . dirname ( this . dest . replace ( path . basename ( this . dest , '' ) ) ) ) ; fs . writeFileSync ( this . dest , contents , 'utf8' ) ; }
Finishes XML and writes file to the file system

@method runnerFinished
@param {object} data Event data
@chainable
Finishes XML and writes file to the file system