1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix global leak in watch tests

This commit is contained in:
Nick O'Leary 2018-01-13 22:59:05 +00:00
parent 548f45cd56
commit ebca753fc4
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -29,19 +29,15 @@ describe('watch Node', function() {
var count = 0;
function prepareDir() {
dirToWatch = path.join(baseDir, "base"+count);
file0ToWatch = path.join(dirToWatch, "file0.txt");
file1ToWatch = path.join(dirToWatch, "file1.txt");
subDirToWatch = path.join(dirToWatch, "subdir");
file2ToWatch = path.join(subDirToWatch, "file2.txt");
var dirToWatch = path.join(baseDir, "base"+count);
fs.mkdirSync(dirToWatch);
count++;
return {
dirToWatch:dirToWatch,
file0ToWatch:file0ToWatch,
file1ToWatch:file1ToWatch,
subDirToWatch:subDirToWatch,
file2ToWatch:file2ToWatch
file0ToWatch:path.join(dirToWatch, "file0.txt");,
file1ToWatch:path.join(dirToWatch, "file1.txt");,
subDirToWatch:path.join(dirToWatch, "subdir");,
file2ToWatch:path.join(subDirToWatch, "file2.txt");
}
}