Skip to content

Commit

Permalink
Fix Node 10 localstorage in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willholley committed Oct 14, 2019
1 parent a499fce commit 96eb6db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 96eb6db

Please sign in to comment.