fix for #542 for fsPromises.symlink(target, path[, type]) (#543)

* updating fs.symlink for promises

* updated the requested changes

* fix#542 added a newline at end
This commit is contained in:
Deepanjali Gerangal 2018-10-20 16:57:45 -04:00 committed by David Humphrey
parent bfcb5a6a94
commit 5568c27bec
1 changed files with 17 additions and 0 deletions

View File

@ -44,3 +44,20 @@ describe('fs.symlink', function() {
});
});
});
describe('fsPromises.symlink', function () {
beforeEach(util.setup);
afterEach(util.cleanup);
it('should return an error if part of the parent destination path does not exist', () => {
var fsPromises = util.fs().promises;
return fsPromises.symlink('/', '/tmp/mydir')
.catch(error => {
expect(error).to.exist;
expect(error.code).to.equal('ENOENT');
});
});
});