From 054094c852c0f19dc095e181481c4c4e6517a8b8 Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Fri, 27 Jul 2018 10:37:45 -0400 Subject: [PATCH] Fix lint issues in fs.read.spec.js, fix test failure in fs.stats.spec.js --- tests/spec/fs.read.spec.js | 4 +++- tests/spec/fs.stats.spec.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/spec/fs.read.spec.js b/tests/spec/fs.read.spec.js index 054e03b..1a57421 100644 --- a/tests/spec/fs.read.spec.js +++ b/tests/spec/fs.read.spec.js @@ -21,6 +21,7 @@ describe('fs.read', function() { if(error) throw error; fs.write(fd, wbuffer, 0, wbuffer.length, 0, function(error, result) { if(error) throw error; + expect(result).to.equal(wbuffer.length); fs.read(fd, rbuffer, 0, rbuffer.length, 0, function(error, result) { expect(error).not.to.exist; @@ -44,6 +45,7 @@ describe('fs.read', function() { fs.write(fd, wbuffer, 0, wbuffer.length, 0, function(error, result) { if(error) throw error; + expect(result).to.equal(wbuffer.length); fs.read(fd, rbuffer, 0, rbuffer.length / 2, undefined, function(error, result) { if(error) throw error; @@ -70,7 +72,7 @@ describe('fs.read', function() { buf2.fill(0); fs.mkdir('/mydir', function(error) { - if(error) throw err; + if(error) throw error; fs.open('/mydir', 'r', function(error, fd) { if(error) throw error; diff --git a/tests/spec/fs.stats.spec.js b/tests/spec/fs.stats.spec.js index 6552cea..1752923 100644 --- a/tests/spec/fs.stats.spec.js +++ b/tests/spec/fs.stats.spec.js @@ -43,9 +43,9 @@ describe('fs.stats', function() { fs.open('/myfile', 'w+', function(error, fd) { if(error) throw error; - fs.close(fd, function(error, stats) { + + fs.close(fd, function(error) { if(error) throw error; - expect(stats).to.exist; fs.symlink('/myfile', '/myfilelink', function(error) { if(error) throw error;