]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/test.webutil.js
Make afterEach() hooks work when skipping tests
[mirror_novnc.git] / tests / test.webutil.js
index 72e194210d57b7c23439ec07979154c229508727..2a166ee05f84f168862d930cc543be4f5bf0b6a0 100644 (file)
@@ -42,7 +42,9 @@ describe('WebUtil', function () {
                 return WebUtil.initSettings();
             });
             afterEach(function () {
-                Object.defineProperty(window, "localStorage", origLocalStorage);
+                if (origLocalStorage !== undefined) {
+                    Object.defineProperty(window, "localStorage", origLocalStorage);
+                }
             });
 
             describe('writeSetting', function () {