blob: e93276f21c57a36572fa18a62d6cd2d12f8597c1 [file] [log] [blame]
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03001global['CSS'] = null;
2
3const mock = () => {
4 let storage = {};
5 return {
6 getItem: key => (key in storage ? storage[key] : null),
7 setItem: (key, value) => (storage[key] = value || ''),
8 removeItem: key => delete storage[key],
9 clear: () => (storage = {})
10 };
11};
12
13Object.defineProperty(window, 'localStorage', { value: mock() });
14Object.defineProperty(window, 'sessionStorage', { value: mock() });
15Object.defineProperty(document, 'doctype', {
16 value: '<!DOCTYPE html>'
17});
18Object.defineProperty(window, 'getComputedStyle', {
19 value: () => {
20 return {
21 display: 'none',
22 appearance: ['-webkit-appearance']
23 };
24 }
25});
26Object.defineProperty(document.body.style, 'transform', {
27 value: () => {
28 return {
29 enumerable: true,
30 configurable: true
31 };
32 }
33});