Skip to content

Commit

Permalink
fixup: don't create the random directory twice
Browse files Browse the repository at this point in the history
  • Loading branch information
santigimeno committed Aug 16, 2016
1 parent 357e6c7 commit 57ebac0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/sequential/test-fs-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ var filenameTwo = 'hasOwnProperty';
var filepathTwo = filenameTwo;
var filepathTwoAbs = path.join(testDir, filenameTwo);

var filenameThree = 'newfile.txt';
var testsubdir = fs.mkdtempSync(testDir + path.sep);
var filepathThree = path.join(testsubdir, filenameThree);


process.on('exit', function() {
assert.ok(watchSeenOne > 0);
assert.ok(watchSeenTwo > 0);
Expand Down Expand Up @@ -78,7 +73,9 @@ setImmediate(function() {
fs.writeFileSync(filepathTwoAbs, 'pardner');
});

fs.mkdirSync(testsubdir, 0o700);
var filenameThree = 'newfile.txt';
var testsubdir = fs.mkdtempSync(testDir + path.sep);
var filepathThree = path.join(testsubdir, filenameThree);

assert.doesNotThrow(
function() {
Expand Down

0 comments on commit 57ebac0

Please sign in to comment.