Fix lint issues in fs.xattr.spec.js
This commit is contained in:
parent
ab87c7f14a
commit
a93ae13c99
|
@ -97,6 +97,7 @@ describe('fs.xattr', function() {
|
||||||
fs.getxattr('/testfile', '', function(error, value) {
|
fs.getxattr('/testfile', '', function(error, value) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
expect(error.code).to.equal('EINVAL');
|
expect(error.code).to.equal('EINVAL');
|
||||||
|
expect(value).not.to.exist;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -111,6 +112,7 @@ describe('fs.xattr', function() {
|
||||||
fs.getxattr('/testfile', 89, function(error, value) {
|
fs.getxattr('/testfile', 89, function(error, value) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
expect(error.code).to.equal('EINVAL');
|
expect(error.code).to.equal('EINVAL');
|
||||||
|
expect(value).not.to.exist;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -125,6 +127,7 @@ describe('fs.xattr', function() {
|
||||||
fs.getxattr('/testfile', 'test', function(error, value) {
|
fs.getxattr('/testfile', 'test', function(error, value) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
expect(error.code).to.equal('ENOATTR');
|
expect(error.code).to.equal('ENOATTR');
|
||||||
|
expect(value).not.to.exist;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -132,10 +135,9 @@ describe('fs.xattr', function() {
|
||||||
|
|
||||||
it('should error when file descriptor is invalid', function(done) {
|
it('should error when file descriptor is invalid', function(done) {
|
||||||
var fs = util.fs();
|
var fs = util.fs();
|
||||||
var completeSet, completeGet, completeRemove;
|
var completeSet = false;
|
||||||
var _value;
|
var completeGet = false;
|
||||||
|
var completeRemove = false;
|
||||||
completeSet = completeGet = completeRemove = false;
|
|
||||||
|
|
||||||
function maybeDone() {
|
function maybeDone() {
|
||||||
if(completeSet && completeGet && completeRemove) {
|
if(completeSet && completeGet && completeRemove) {
|
||||||
|
@ -161,6 +163,7 @@ describe('fs.xattr', function() {
|
||||||
fs.fremovexattr(1, 'test', function(error, value) {
|
fs.fremovexattr(1, 'test', function(error, value) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
expect(error.code).to.equal('EBADF');
|
expect(error.code).to.equal('EBADF');
|
||||||
|
expect(value).not.to.exist;
|
||||||
completeRemove = true;
|
completeRemove = true;
|
||||||
maybeDone();
|
maybeDone();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue