diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index 898e5bf9..892ba852 100644 --- a/test/app-tests/loading.js +++ b/test/app-tests/loading.js @@ -59,8 +59,6 @@ describe('loading:', function () { windowLocation = null; matrixChat = null; - - window.localStorage.clear(); }); afterEach(function() { diff --git a/test/test-utils.js b/test/test-utils.js index ad58b805..53528e5c 100644 --- a/test/test-utils.js +++ b/test/test-utils.js @@ -12,6 +12,10 @@ module.exports.beforeEach = function(context) { console.log(); console.log(desc); console.log(new Array(1 + desc.length).join("=")); + + // some tests store things in localstorage. Improve independence of tests + // by making sure that they don't inherit any old state. + window.localStorage.clear(); }; /**