Skip to content

Commit

Permalink
Merge pull request #12 from lhorak/reporter_path
Browse files Browse the repository at this point in the history
FIX Reporter output file (creates directory)
  • Loading branch information
crudo authored Apr 4, 2017
2 parents 2e3bf78 + 5cedbd2 commit 40c7e7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"grunt-contrib-clean": "1.0.0",
"grunt-http-server": "2.0.0",
"gruntify-eslint": "3.1.0",
"mkdirp": "0.5.1",
"testcafe": "0.14.0",
"testcafe-reporter-xunit": "2.1.0"
},
Expand Down
3 changes: 3 additions & 0 deletions tasks/testcafe.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const mkdirp = require('mkdirp');
const createTestCafe = require('testcafe');

const DEFAULT_OPTS = {
Expand Down Expand Up @@ -56,6 +58,7 @@ module.exports = (grunt) => {
})
.then(() => {
if (opts.reporterOutputFile) {
mkdirp.sync(path.dirname(opts.reporterOutputFile));
stream = fs.createWriteStream(opts.reporterOutputFile);
}

Expand Down

0 comments on commit 40c7e7a

Please sign in to comment.