Merge pull request #1950 from vector-im/rav/clear_test_localstorage

Make sure that we clear localstorage before *all* tests
pull/1959/head
David Baker 2016-08-11 12:34:37 +01:00 committed by GitHub
commit 4a0a911f3b
2 changed files with 4 additions and 2 deletions

View File

@ -59,8 +59,6 @@ describe('loading:', function () {
windowLocation = null;
matrixChat = null;
window.localStorage.clear();
});
afterEach(function() {

View File

@ -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();
};
/**