Skip to content

Commit

Permalink
fix for #542 for fsPromises.symlink(target, path[, type]) (#543)
Browse files Browse the repository at this point in the history
* updating fs.symlink for promises

* updated the requested changes

* fix#542 added a newline at end
  • Loading branch information
deepanjali19 authored and humphd committed Oct 20, 2018
1 parent bfcb5a6 commit 5568c27
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/spec/fs.symlink.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
});

0 comments on commit 5568c27

Please sign in to comment.