index.js
function writeLogs(test, dirName) {
  var logs =
    test.fullTitle() +
    '\n' +
    test.file +
    '\nStart: ' +
    test.start +
    '\nEnd: ' +
    test.end +
    '\nElapsed: ' +
    test.duration +
    '\nStatus: ' +
    test.state;
  if (test.state === 'fail') {
    logs += '\nError: ' + test.err.stack;
  }
  mkdirp.sync(testDir(test, dirName));
  fs.writeFileSync(testURL(test, dirName), logs);
  test.url = testURL(test, dirName);
}
function writeLogs(test, dirName) {
  var logs =
    test.fullTitle() +
    '\n' +
    test.file +
    '\nStart: ' +
    test.start +
    '\nEnd: ' +
    test.end +
    '\nElapsed: ' +
    test.duration +
    '\nStatus: ' +
    test.state;
  if (test.state === 'fail') {
    logs += '\nError: ' + test.err.stack;
  }
  mkdirp.sync(testDir(test, dirName));
  fs.writeFileSync(testURL(test, dirName), logs);
  test.url = testURL(test, dirName);
}
function writeLogs ( test , dirName ) { var logs = test . fullTitle ( ) + '\n' + test . file + '\nStart: ' + test . start + '\nEnd: ' + test . end + '\nElapsed: ' + test . duration + '\nStatus: ' + test . state ; if ( test . state === 'fail' ) { logs += '\nError: ' + test . err . stack ; } mkdirp . sync ( testDir ( test , dirName ) ) ; fs . writeFileSync ( testURL ( test , dirName ) , logs ) ; test . url = testURL ( test , dirName ) ; }
Writes logs to a file in the specified directory
@param {test} test
@param {string} dirName
Writes logs to a file in the specified directory