Issue497 Add test for fs.chmod when the path is invalid (#525)
* Fix #497 Add test for fs.chmod when the path is invalid * Fix #497 All test passed
This commit is contained in:
parent
27659d45da
commit
8504cc7e2a
|
@ -39,6 +39,16 @@ describe('fs.chmod, fs.fchmod', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should be an error when the path is invalid', function(done){
|
||||||
|
var fs = util.fs();
|
||||||
|
fs.chmod('/invalid_path', 0o444, function(err){
|
||||||
|
expect(err).to.exist;
|
||||||
|
expect(err.code).to.equal('ENOENT');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
it('should allow for updating mode of a given file', function(done) {
|
it('should allow for updating mode of a given file', function(done) {
|
||||||
var fs = util.fs();
|
var fs = util.fs();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue