Skip to content

Commit

Permalink
'Use strict' @top and updated the file with const/let [issue-702] (#726)
Browse files Browse the repository at this point in the history
* filer.spec.js var changed to const/let

* let changed to const for a local variable, which is constant through out
  • Loading branch information
SahibArora authored and humphd committed Feb 5, 2019
1 parent da1aad5 commit b5e1d9a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/spec/filer.spec.js
@@ -1,6 +1,7 @@
var Filer = require('../../src');
var util = require('../lib/test-utils');
var expect = require('chai').expect;
'use strict';
const Filer = require('../../src');
const util = require('../lib/test-utils');
const expect = require('chai').expect;

describe('Filer', function() {
it('is defined', function() {
Expand Down Expand Up @@ -45,21 +46,21 @@ describe('Filer', function() {
});

it('must honor the \'FORMAT\' flag', function(done) {
var name = 'local-test';
const name = 'local-test';
// Because we need to use a bunch of Filer filesystems
// in this test, we can't use the usual test infrastructure
// to create/manage the fs instance. Pick the best one
// based on the testing environment (browser vs. node)
var providers = Filer.FileSystem.providers;
var Provider;
const providers = Filer.FileSystem.providers;
let Provider;
if(providers.IndexedDB.isSupported()) {
Provider = providers.IndexedDB;
} else {
Provider = providers.Memory;
}

var fs = new Filer.FileSystem({name, provider: new Provider(name)});
var fs2 = new Filer.FileSystem({name, provider: new Provider(name)});
let fs = new Filer.FileSystem({name, provider: new Provider(name)});
let fs2 = new Filer.FileSystem({name, provider: new Provider(name)});

fs.mkdir('/test', function(err){
if(err) throw err;
Expand Down

0 comments on commit b5e1d9a

Please sign in to comment.