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
This commit is contained in:
Violet-XiaoWeiHuang 2019-02-01 15:04:15 -05:00 committed by David Humphrey
parent 4ba9eded4c
commit 05057c45d2
1 changed files with 9 additions and 7 deletions

View File

@ -1,14 +1,16 @@
var Filer = require('../../src'); 'use strict';
var util = require('../lib/test-utils.js');
var expect = require('chai').expect; 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() { describe('node times (atime, mtime, ctime) with mount flags', function() {
var dirname = '/dir'; const dirname = '/dir';
var filename = '/dir/file'; const filename = '/dir/file';
function memoryFS(flags, callback) { function memoryFS(flags, callback) {
var name = util.uniqueName(); const name = util.uniqueName();
return new Filer.FileSystem({ return new Filer.FileSystem({
name: name, name: name,
flags: flags || [], 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) { it('should not update ctime when calling fs.rename() with NOCTIME', function(done) {
memoryFS(['NOCTIME'], function(error, fs) { memoryFS(['NOCTIME'], function(error, fs) {
var newfilename = filename + '1'; const newfilename = filename + '1';
createTree(fs, function() { createTree(fs, function() {
stat(fs, filename, function(stats1) { stat(fs, filename, function(stats1) {