Fix #421 - Add test for fs.promises.link to ensure it returns a Promise (#462)

* Add test

* Move location of describe block

* Remove comment

* Have test check returnValue and not obj

* Override package-lock.json with one from master branch

* Improve naming of fsPromise variable to be more clear
This commit is contained in:
Julia McGeoghan 2018-10-09 17:35:28 -04:00 committed by David Humphrey
parent 8504cc7e2a
commit 389dedd3c0
1 changed files with 14 additions and 1 deletions

View File

@ -80,7 +80,6 @@ describe('fs.link', function() {
fs.lstat('/myfileLink', function (error, result) {
if (error) throw error;
var _linkstats = result;
fs.lstat('/myotherfile', function (error, result) {
expect(error).not.to.exist;
@ -110,4 +109,18 @@ describe('fs.link', function() {
});
});
});
});
describe('fs.promises.link', function() {
beforeEach(util.setup);
afterEach(util.cleanup);
it('should return a promise', function() {
var fsPromise = util.fs().promises;
var returnValue = fsPromise.link('/myfile', '/myotherfile');
expect(returnValue).to.be.a('promise');
});
});