summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/test-env-setup.js
blob: a2ed491319e63f89d543a41918b252d2e752784c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var localStorageMock = (function() {
    var store = {};
    return {
        getItem: function(key) {
            return store[key];
        },
    setItem: function(key, value) {
        store[key] = value.toString();
    },
    clear: function() {
        store = {};
    }
  };
})();

Object.defineProperty(window, 'localStorage', { value: localStorageMock });