Permalink
Browse files

Fix: Cleanup temp files from tests (fixes #5338)

Also removes the dependency on multiple temp dir modules
  • Loading branch information...
MethodGrab committed Feb 19, 2016
1 parent 798ac54 commit 1c347f5c2c4d72e5bb6a3d5224765273e7241bb7
Showing with 2 additions and 4 deletions.
  1. +1 −2 package.json
  2. +1 −2 tests/lib/config/config-file.js
View
@@ -98,8 +98,7 @@
"shelljs-nodecli": "~0.1.0",
"sinon": "^1.17.2",
"temp": "^0.8.3",
"through": "^2.3.6",
"tmp": "0.0.28"
"through": "^2.3.6"
},
"keywords": [
"ast",
@@ -15,7 +15,6 @@ var assert = require("chai").assert,
sinon = require("sinon"),
path = require("path"),
fs = require("fs"),
tmp = require("tmp"),
temp = require("temp"),
yaml = require("js-yaml"),
resolve = require("resolve"),
@@ -70,7 +69,7 @@ function readJSModule(code) {
* @private
*/
function writeTempConfigFile(config, filename, existingTmpDir) {
var tmpFileDir = existingTmpDir || tmp.dirSync({prefix: "eslint-tests-"}).name,
var tmpFileDir = existingTmpDir || temp.mkdirSync("eslint-tests-"),
tmpFilePath = path.join(tmpFileDir, filename),
tmpFileContents = JSON.stringify(config);
fs.writeFileSync(tmpFilePath, tmpFileContents);

0 comments on commit 1c347f5

Please sign in to comment.