Fix #710: updated let to const.

This commit is contained in:
Abdirahman Guled 2019-02-13 14:20:14 -05:00 committed by David Humphrey (:humph) david.humphrey@senecacollege.ca
parent 7ab6f5e7c6
commit 3d10d6431c
2 changed files with 9 additions and 7 deletions

View File

@ -5,3 +5,4 @@ Barry Tulchinsky <barry.tulchinsky@gmail.com> (@btulchinsky)
Kieran Sedgwick <kieran.sedgwick@gmail.com> (@sedge)
Yoav Gurevich <ygurevich@ymail.com>
Gideon Thomas <r.gideonthomas@gmail.com>
Abdirahman Guled <aguled2@myseneca.ca>

View File

@ -1,17 +1,18 @@
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.exists', function() {
beforeEach(util.setup);
afterEach(util.cleanup);
it('should be a function', function() {
var fs = util.fs();
const fs = util.fs();
expect(typeof fs.exists).to.equal('function');
});
it('should return false if path does not exist', function(done) {
var fs = util.fs();
const fs = util.fs();
fs.exists('/tmp', function(result) {
expect(result).to.be.false;
@ -20,7 +21,7 @@ describe('fs.exists', function() {
});
it('should return true if path exists', function(done) {
var fs = util.fs();
const fs = util.fs();
fs.open('/myfile', 'w', function(err, fd) {
if(err) throw err;
@ -37,7 +38,7 @@ describe('fs.exists', function() {
});
it('should follow symbolic links and return true for the resulting path', function(done) {
var fs = util.fs();
const fs = util.fs();
fs.open('/myfile', 'w', function(error, fd) {
if(error) throw error;
@ -58,7 +59,7 @@ describe('fs.exists', function() {
});
it('should follow symbolic links and return false if for the resulting path does not exist', function(done) {
var fs = util.fs();
const fs = util.fs();
fs.open('/myfile', 'w', function(error, fd) {
if(error) throw error;