This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
image-juicer/test/setup.js
2017-04-05 16:15:35 -04:00

17 lines
383 B
JavaScript

import { jsdom } from 'jsdom';
global.document = jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
global.navigator = global.window.navigator;
window.localStorage = window.sessionStorage = {
getItem(key) {
return this[key];
},
setItem(key, value) {
this[key] = value;
},
removeItem(key) {
this[key] = undefined;
},
};