From af3815c54b2b4075f2f038a294f28bb0afaaefb1 Mon Sep 17 00:00:00 2001 From: Dragomegak Date: Thu, 11 Oct 2018 20:59:09 -0400 Subject: [PATCH] Removes Symbolic Link check & Fixing Mixing Callbacks and Promises (Basically the fs.link test though) --- tests/spec/fs.link.spec.js | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/tests/spec/fs.link.spec.js b/tests/spec/fs.link.spec.js index 4bf4f02..4476e85 100644 --- a/tests/spec/fs.link.spec.js +++ b/tests/spec/fs.link.spec.js @@ -187,7 +187,7 @@ describe('fs.promises.link', function() { fs.writeFile('/file', contents, function(err) { if(err) throw err; - fs.promises.link('/file', '/hlink', function(err) { + fs.link('/file', '/hlink', function(err) { if(err) throw err; fs.readFile('/file', 'utf8', function(err, fileData) { @@ -204,39 +204,6 @@ describe('fs.promises.link', function() { }); }); - it('should not follow symbolic links', function(done) { - var fs = util.fs(); - - fs.stat('/', function (error, result) { - if (error) throw error; - expect(result).to.exist; - - fs.symlink('/', '/myfileLink', function (error) { - if (error) throw error; - - fs.promises.link('/myfileLink', '/myotherfile').then(function(){ - if (error) throw error; - - fs.lstat('/myfileLink', function (error, result) { - - var _linkstats = result; - fs.lstat('/myotherfile', function (error, result) { - expect(error).not.to.exist; - expect(result.dev).to.equal(_linkstats.dev); - expect(result.node).to.equal(_linkstats.node); - expect(result.size).to.equal(_linkstats.size); - expect(result.type).to.equal(_linkstats.type); - expect(result.nlinks).to.equal(2); - done(); - }); - }, - function(error){throw error;} - ); - }); - }); - }); - }); - it('should not allow links to a directory', function(done) { var fs = util.fs();