diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index 898e5bf9dc..892ba85268 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 ad58b80595..53528e5ceb 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(); }; /**