added test to fs.readlink.spec.js
This commit is contained in:
parent
2a4fa0f0fd
commit
914ba8b473
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue