From 05057c45d2dbe4acbf9a3ae8c6b4eef825a75d6d Mon Sep 17 00:00:00 2001 From: Violet-XiaoWeiHuang Date: Fri, 1 Feb 2019 15:04:15 -0500 Subject: [PATCH] Fix ssue #692: Update code in filer/tests/spec/time-flags.spec.js (#696) * installed npm * modified time-flags.spec.js * Update code to use const/let instead of var * update the variable type from let to const * add Strict mode * review fixed --- tests/spec/time-flags.spec.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/spec/time-flags.spec.js b/tests/spec/time-flags.spec.js index a0c4f83..c6bf9e3 100644 --- a/tests/spec/time-flags.spec.js +++ b/tests/spec/time-flags.spec.js @@ -1,14 +1,16 @@ -var Filer = require('../../src'); -var util = require('../lib/test-utils.js'); -var expect = require('chai').expect; +'use strict'; + +const Filer = require('../../src'); +const util = require('../lib/test-utils.js'); +const expect = require('chai').expect; describe('node times (atime, mtime, ctime) with mount flags', function() { - var dirname = '/dir'; - var filename = '/dir/file'; + const dirname = '/dir'; + const filename = '/dir/file'; function memoryFS(flags, callback) { - var name = util.uniqueName(); + const name = util.uniqueName(); return new Filer.FileSystem({ name: name, flags: flags || [], @@ -44,7 +46,7 @@ describe('node times (atime, mtime, ctime) with mount flags', function() { it('should not update ctime when calling fs.rename() with NOCTIME', function(done) { memoryFS(['NOCTIME'], function(error, fs) { - var newfilename = filename + '1'; + const newfilename = filename + '1'; createTree(fs, function() { stat(fs, filename, function(stats1) {