blob: a2ed491319e63f89d543a41918b252d2e752784c [file] [log] [blame]
AviZi280f8012017-06-09 02:39:56 +03001var localStorageMock = (function() {
2 var store = {};
3 return {
4 getItem: function(key) {
5 return store[key];
6 },
7 setItem: function(key, value) {
8 store[key] = value.toString();
9 },
10 clear: function() {
11 store = {};
12 }
13 };
14})();
15
16Object.defineProperty(window, 'localStorage', { value: localStorageMock });