You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wi...@apache.org on 2019/10/14 15:25:17 UTC

[couchdb-fauxton] 02/04: Fix Node 10 localstorage in tests

This is an automated email from the ASF dual-hosted git repository.

willholley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git

commit 1633bee9cad8c97f8b04e62c7186d84de44e0e07
Author: Will Holley <wi...@gmail.com>
AuthorDate: Mon Oct 14 10:06:47 2019 +0100

    Fix Node 10 localstorage in tests
---
 jest-setup.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/jest-setup.js b/jest-setup.js
index f137257..c7f01b0 100644
--- a/jest-setup.js
+++ b/jest-setup.js
@@ -14,7 +14,13 @@ require('jest');
 require('whatwg-fetch');
 require('mock-local-storage');
 
-window.localStorage = global.localStorage;
+Object.defineProperty(window, 'localStorage', {
+  value: global.localStorage,
+  configurable:true,
+  enumerable:true,
+  writable:true
+});
+
 window.$ = window.jQuery = require('jquery');
 window._ = require('lodash');
 window.Backbone = require('backbone');