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:
parent
548f45cd56
commit
ebca753fc4
@ -29,19 +29,15 @@ describe('watch Node', function() {
|
|||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
function prepareDir() {
|
function prepareDir() {
|
||||||
dirToWatch = path.join(baseDir, "base"+count);
|
var 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");
|
|
||||||
fs.mkdirSync(dirToWatch);
|
fs.mkdirSync(dirToWatch);
|
||||||
count++;
|
count++;
|
||||||
return {
|
return {
|
||||||
dirToWatch:dirToWatch,
|
dirToWatch:dirToWatch,
|
||||||
file0ToWatch:file0ToWatch,
|
file0ToWatch:path.join(dirToWatch, "file0.txt");,
|
||||||
file1ToWatch:file1ToWatch,
|
file1ToWatch:path.join(dirToWatch, "file1.txt");,
|
||||||
subDirToWatch:subDirToWatch,
|
subDirToWatch:path.join(dirToWatch, "subdir");,
|
||||||
file2ToWatch:file2ToWatch
|
file2ToWatch:path.join(subDirToWatch, "file2.txt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user