Fix lint issues in times.spec.js
This commit is contained in:
parent
e5b6026b91
commit
4a066064f4
|
@ -364,6 +364,7 @@ describe('node times (atime, mtime, ctime)', function() {
|
||||||
stat('/myfile', function(stats1) {
|
stat('/myfile', function(stats1) {
|
||||||
fs.write(fd, buffer, 0, buffer.length, 0, function(error, nbytes) {
|
fs.write(fd, buffer, 0, buffer.length, 0, function(error, nbytes) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
expect(nbytes).to.equal(buffer.length);
|
||||||
|
|
||||||
fs.close(fd, function(error) {
|
fs.close(fd, function(error) {
|
||||||
if(error) throw 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) {
|
fs.write(fd, buffer, 0, buffer.length, 0, function(err, nbytes) {
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
|
expect(nbytes).to.equal(buffer.length);
|
||||||
|
|
||||||
fs.close(fd, function(error) {
|
fs.close(fd, function(error) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
@ -402,6 +404,8 @@ describe('node times (atime, mtime, ctime)', function() {
|
||||||
var buffer2 = new Filer.Buffer(buffer.length);
|
var buffer2 = new Filer.Buffer(buffer.length);
|
||||||
buffer2.fill(0);
|
buffer2.fill(0);
|
||||||
fs.read(fd, buffer2, 0, buffer2.length, 0, function(err, nbytes) {
|
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) {
|
fs.close(fd, function(error) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
@ -429,6 +433,7 @@ describe('node times (atime, mtime, ctime)', function() {
|
||||||
stat(filename, function(stats1) {
|
stat(filename, function(stats1) {
|
||||||
fs.readFile(filename, function(error, data) {
|
fs.readFile(filename, function(error, data) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
expect(data).to.exist;
|
||||||
|
|
||||||
stat(filename, function(stats2) {
|
stat(filename, function(stats2) {
|
||||||
expect(stats2.ctime).to.equal(stats1.ctime);
|
expect(stats2.ctime).to.equal(stats1.ctime);
|
||||||
|
@ -531,6 +536,7 @@ describe('node times (atime, mtime, ctime)', function() {
|
||||||
stat(filename, function(stats1) {
|
stat(filename, function(stats1) {
|
||||||
fs.getxattr(filename, 'extra', function(error, value) {
|
fs.getxattr(filename, 'extra', function(error, value) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
expect(value).to.equal('data');
|
||||||
|
|
||||||
stat(filename, function(stats2) {
|
stat(filename, function(stats2) {
|
||||||
expect(stats2.ctime).to.equal(stats1.ctime);
|
expect(stats2.ctime).to.equal(stats1.ctime);
|
||||||
|
@ -557,6 +563,7 @@ describe('node times (atime, mtime, ctime)', function() {
|
||||||
stat(filename, function(stats1) {
|
stat(filename, function(stats1) {
|
||||||
fs.fgetxattr(fd, 'extra', function(error, value) {
|
fs.fgetxattr(fd, 'extra', function(error, value) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
expect(value).to.equal('data');
|
||||||
|
|
||||||
stat(filename, function(stats2) {
|
stat(filename, function(stats2) {
|
||||||
expect(stats2.ctime).to.equal(stats1.ctime);
|
expect(stats2.ctime).to.equal(stats1.ctime);
|
||||||
|
|
Loading…
Reference in New Issue