From fc545ee3c78cd7c01db7b8054c9d68e076020a53 Mon Sep 17 00:00:00 2001 From: OlenaVyshnevska Date: Thu, 31 Jan 2019 15:25:57 -0500 Subject: [PATCH] code refactoring, added strict mode (#704) --- tests/spec/fs.close.spec.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/spec/fs.close.spec.js b/tests/spec/fs.close.spec.js index 33e1808..677c241 100644 --- a/tests/spec/fs.close.spec.js +++ b/tests/spec/fs.close.spec.js @@ -1,23 +1,25 @@ -var util = require('../lib/test-utils.js'); -var expect = require('chai').expect; +'use strict'; + +const util = require('../lib/test-utils.js'); +const expect = require('chai').expect; describe('fs.close', function() { beforeEach(util.setup); afterEach(util.cleanup); it('should be a function', function() { - var fs = util.fs(); + const fs = util.fs(); expect(typeof fs.close).to.equal('function'); }); it('should release the file descriptor', function(done) { - var buffer = Buffer.alloc(0); - var fs = util.fs(); + const buffer = Buffer.alloc(0); + const fs = util.fs(); fs.open('/myfile', 'w+', function(error, result) { if(error) throw error; - var fd = result; + const fd = result; fs.close(fd, function(error) { if(error) throw error;