mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Watch node - filter subdir events in tests because fs.notify is inconsistent
This commit is contained in:
parent
5cfbb87bee
commit
cb4120ec4b
@ -78,6 +78,11 @@ describe('watch Node', function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
processed[file] = true;
|
processed[file] = true;
|
||||||
|
if (file === 'subdir') {
|
||||||
|
// On OSX, we get a change event on subdir when a file inside changes.
|
||||||
|
// On Travis, we don't. *sigh*
|
||||||
|
return;
|
||||||
|
}
|
||||||
(file in results).should.be.true();
|
(file in results).should.be.true();
|
||||||
|
|
||||||
var result = results[file];
|
var result = results[file];
|
||||||
@ -198,12 +203,6 @@ describe('watch Node', function() {
|
|||||||
wires:[["n2"]]},
|
wires:[["n2"]]},
|
||||||
{id:"n2", type:"helper"}];
|
{id:"n2", type:"helper"}];
|
||||||
var results = {
|
var results = {
|
||||||
'subdir': {
|
|
||||||
payload: files.subDirToWatch,
|
|
||||||
topic: files.dirToWatch,
|
|
||||||
file: 'subdir',
|
|
||||||
type: 'directory'
|
|
||||||
},
|
|
||||||
'file2.txt': {
|
'file2.txt': {
|
||||||
payload: files.file2ToWatch,
|
payload: files.file2ToWatch,
|
||||||
type: 'file'//,
|
type: 'file'//,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user