diff --git a/tests/spec/times.spec.js b/tests/spec/times.spec.js index 5b112fb..d25d86a 100644 --- a/tests/spec/times.spec.js +++ b/tests/spec/times.spec.js @@ -364,6 +364,7 @@ describe('node times (atime, mtime, ctime)', function() { stat('/myfile', function(stats1) { fs.write(fd, buffer, 0, buffer.length, 0, function(error, nbytes) { if(error) throw error; + expect(nbytes).to.equal(buffer.length); fs.close(fd, function(error) { if(error) throw error; @@ -391,6 +392,7 @@ describe('node times (atime, mtime, ctime)', function() { fs.write(fd, buffer, 0, buffer.length, 0, function(err, nbytes) { if(err) throw err; + expect(nbytes).to.equal(buffer.length); fs.close(fd, function(error) { if(error) throw error; @@ -402,6 +404,8 @@ describe('node times (atime, mtime, ctime)', function() { var buffer2 = new Filer.Buffer(buffer.length); buffer2.fill(0); fs.read(fd, buffer2, 0, buffer2.length, 0, function(err, nbytes) { + if(err) throw err; + expect(nbytes).to.equal(buffer2.length); fs.close(fd, function(error) { if(error) throw error; @@ -429,6 +433,7 @@ describe('node times (atime, mtime, ctime)', function() { stat(filename, function(stats1) { fs.readFile(filename, function(error, data) { if(error) throw error; + expect(data).to.exist; stat(filename, function(stats2) { expect(stats2.ctime).to.equal(stats1.ctime); @@ -531,6 +536,7 @@ describe('node times (atime, mtime, ctime)', function() { stat(filename, function(stats1) { fs.getxattr(filename, 'extra', function(error, value) { if(error) throw error; + expect(value).to.equal('data'); stat(filename, function(stats2) { expect(stats2.ctime).to.equal(stats1.ctime); @@ -557,6 +563,7 @@ describe('node times (atime, mtime, ctime)', function() { stat(filename, function(stats1) { fs.fgetxattr(fd, 'extra', function(error, value) { if(error) throw error; + expect(value).to.equal('data'); stat(filename, function(stats2) { expect(stats2.ctime).to.equal(stats1.ctime);