Rebase and rework test, skip() for now, see #594
This commit is contained in:
parent
97fb82769a
commit
f5678ebe20
|
@ -73,8 +73,10 @@ describe('fs.watch', function() {
|
|||
if(error) throw error;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should get a change event when a file hardlink is being watched and the original file is changed', function(done) {
|
||||
// Bug to deal with this is filed at https://github.com/filerjs/filer/issues/594
|
||||
it.skip('should get a change event when a hardlink is watched and the original file is changed', function(done) {
|
||||
var fs = util.fs();
|
||||
|
||||
fs.writeFile('/myfile', 'data', function(error) {
|
||||
|
@ -86,19 +88,19 @@ describe('fs.watch', function() {
|
|||
var watcher = fs.watch('/hardlink', function(event, filename) {
|
||||
expect(event).to.equal('change');
|
||||
expect(filename).to.equal('/hardlink');
|
||||
watcher.close();
|
||||
done();
|
||||
});
|
||||
|
||||
fs.appendFile('/myfile', '...more data', function(error) {
|
||||
if(error) throw error;
|
||||
watcher.close();
|
||||
|
||||
fs.readFile('/hardlink', 'utf8', function(error, data) {
|
||||
if(error) throw error;
|
||||
|
||||
expect(data).to.equal('data...more data')
|
||||
expect(data).to.equal('data...more data');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
fs.appendFile('/myfile', '...more data', function(error) {
|
||||
if(error) throw error;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -109,7 +111,6 @@ describe('fs.watch', function() {
|
|||
|
||||
fs.writeFile('/myfile', 'data', function(error) {
|
||||
if(error) throw error;
|
||||
});
|
||||
|
||||
//Normaly A 'rename' event should be thrown, but filer doesn't support that event at this time.
|
||||
//For now renaming a file will throw a change event.
|
||||
|
@ -125,3 +126,4 @@ describe('fs.watch', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue