Fix lint issues in fs.read.spec.js, fix test failure in fs.stats.spec.js

This commit is contained in:
David Humphrey 2018-07-27 10:37:45 -04:00
parent cafff52c3a
commit 054094c852
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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;