* add test for exits when resulting path of a symbolic link is not found * fixed style nit
This commit is contained in:
parent
009821290f
commit
c7ea45a18b
|
@ -56,4 +56,29 @@ describe('fs.exists', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should follow symbolic links and return false if for the resulting path does not exist', function(done) {
|
||||
var fs = util.fs();
|
||||
|
||||
fs.open('/myfile', 'w', function(error, fd) {
|
||||
if(error) throw error;
|
||||
|
||||
fs.close(fd, function(error) {
|
||||
if(error) throw error;
|
||||
|
||||
fs.symlink('/myfile', '/myfilelink', function(error) {
|
||||
if(error) throw error;
|
||||
|
||||
fs.unlink('/myfile', function(err) {
|
||||
if(err) throw err;
|
||||
|
||||
fs.exists('/myfilelink', function(result) {
|
||||
expect(result).to.be.false;
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue