aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/test-env-setup.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/test-utils/test-env-setup.js')
-rw-r--r--openecomp-ui/test-utils/test-env-setup.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/openecomp-ui/test-utils/test-env-setup.js b/openecomp-ui/test-utils/test-env-setup.js
new file mode 100644
index 0000000000..a2ed491319
--- /dev/null
+++ b/openecomp-ui/test-utils/test-env-setup.js
@@ -0,0 +1,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 }); \ No newline at end of file