added test to fs.readlink.spec.js

This commit is contained in:
rscotchmer 2019-02-26 11:40:27 -05:00 committed by David Humphrey
parent 2a4fa0f0fd
commit 914ba8b473
1 changed files with 34 additions and 19 deletions

View File

@ -32,6 +32,21 @@ describe('fs.readlink', function() {
}); });
}); });
it('should return an error if the path is not a symbolic link', function (done) {
const fs = util.fs();
fs.mkdir('/tmp', function (error) {
if (error) throw error;
fs.readlink('/tmp', function (error) {
expect(error).to.exist;
expect(error.code).to.equal('EINVAL');
done();
});
});
});
it('should return the contents of a symbolic link', function (done) { it('should return the contents of a symbolic link', function (done) {
const fs = util.fs(); const fs = util.fs();