Skip to content

Commit

Permalink
Merge pull request #79 from vvakame/feat-mkdirp
Browse files Browse the repository at this point in the history
feat(test): do mkdirp before writing expected result files
  • Loading branch information
vvakame authored Feb 27, 2017
2 parents 1f5ef1e + 18e6c7b commit 14ac2aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"devDependencies": {
"@types/glob-expand": "^0.0.30",
"@types/mkdirp": "^0.3.29",
"@types/mocha": "^2.2.33",
"@types/node": "^7.0.5",
"@types/power-assert": "^1.4.29",
Expand All @@ -52,6 +53,7 @@
"grunt-mocha-test": "^0.13.2",
"grunt-tslint": "^4.0.1",
"load-grunt-tasks": "^3.5.0",
"mkdirp": "^0.5.1",
"mocha": "^3.0.2",
"power-assert": "^1.4.2",
"tslint": "^4.4.2",
Expand Down
2 changes: 2 additions & 0 deletions test/indexSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import fs = require("fs");
import path = require("path");
import childProcess = require("child_process");
import stream = require("stream");
import mkdirp = require("mkdirp");

import lib = require("../lib/");

Expand Down Expand Up @@ -127,6 +128,7 @@ describe("tsfmt test", () => {
// console.log(fileName, expectedFileName);

if (!fs.existsSync(expectedTsFileName)) {
mkdirp.sync(path.dirname(expectedTsFileName));
fs.writeFileSync(expectedTsFileName, result.dest);
}

Expand Down

0 comments on commit 14ac2aa

Please sign in to comment.