diff --git a/tests/lib/indexeddb.js b/tests/lib/indexeddb.js index 146a415..03ca614 100644 --- a/tests/lib/indexeddb.js +++ b/tests/lib/indexeddb.js @@ -1,6 +1,8 @@ -var Filer = require('../../src'); +'use strict'; -var needsCleanup = []; +const Filer = require('../../src'); + +let needsCleanup = []; if(global.addEventListener) { global.addEventListener('beforeunload', function() { needsCleanup.forEach(function(f) { f(); }); @@ -8,8 +10,8 @@ if(global.addEventListener) { } function IndexedDBTestProvider(name) { - var _done = false; - var that = this; + let _done = false; + let that = this; function cleanup(callback) { callback = callback || function(){}; @@ -31,12 +33,12 @@ function IndexedDBTestProvider(name) { that.provider.db.close(); } - var indexedDB = global.indexedDB || + const indexedDB = global.indexedDB || global.mozIndexedDB || global.webkitIndexedDB || global.msIndexedDB; - var request = indexedDB.deleteDatabase(name); + let request = indexedDB.deleteDatabase(name); request.onsuccess = finished; request.onerror = finished; } catch(e) {