Fix #710: updated let to const.
This commit is contained in:
parent
7ab6f5e7c6
commit
3d10d6431c
1
AUTHORS
1
AUTHORS
|
@ -5,3 +5,4 @@ Barry Tulchinsky <barry.tulchinsky@gmail.com> (@btulchinsky)
|
||||||
Kieran Sedgwick <kieran.sedgwick@gmail.com> (@sedge)
|
Kieran Sedgwick <kieran.sedgwick@gmail.com> (@sedge)
|
||||||
Yoav Gurevich <ygurevich@ymail.com>
|
Yoav Gurevich <ygurevich@ymail.com>
|
||||||
Gideon Thomas <r.gideonthomas@gmail.com>
|
Gideon Thomas <r.gideonthomas@gmail.com>
|
||||||
|
Abdirahman Guled <aguled2@myseneca.ca>
|
|
@ -1,17 +1,18 @@
|
||||||
var util = require('../lib/test-utils.js');
|
'use strict';
|
||||||
var expect = require('chai').expect;
|
const util = require('../lib/test-utils.js');
|
||||||
|
const expect = require('chai').expect;
|
||||||
|
|
||||||
describe('fs.exists', function() {
|
describe('fs.exists', function() {
|
||||||
beforeEach(util.setup);
|
beforeEach(util.setup);
|
||||||
afterEach(util.cleanup);
|
afterEach(util.cleanup);
|
||||||
|
|
||||||
it('should be a function', function() {
|
it('should be a function', function() {
|
||||||
var fs = util.fs();
|
const fs = util.fs();
|
||||||
expect(typeof fs.exists).to.equal('function');
|
expect(typeof fs.exists).to.equal('function');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return false if path does not exist', function(done) {
|
it('should return false if path does not exist', function(done) {
|
||||||
var fs = util.fs();
|
const fs = util.fs();
|
||||||
|
|
||||||
fs.exists('/tmp', function(result) {
|
fs.exists('/tmp', function(result) {
|
||||||
expect(result).to.be.false;
|
expect(result).to.be.false;
|
||||||
|
@ -20,7 +21,7 @@ describe('fs.exists', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return true if path exists', function(done) {
|
it('should return true if path exists', function(done) {
|
||||||
var fs = util.fs();
|
const fs = util.fs();
|
||||||
|
|
||||||
fs.open('/myfile', 'w', function(err, fd) {
|
fs.open('/myfile', 'w', function(err, fd) {
|
||||||
if(err) throw err;
|
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) {
|
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) {
|
fs.open('/myfile', 'w', function(error, fd) {
|
||||||
if(error) throw error;
|
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) {
|
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) {
|
fs.open('/myfile', 'w', function(error, fd) {
|
||||||
if(error) throw error;
|
if(error) throw error;
|
||||||
|
|
Loading…
Reference in New Issue