All files / config jest.js

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37                                                                         
// import { shallow, render, mount } from 'enzyme';
 
// export const setPathname = pathname => {
//   Object.defineProperty(window.location, 'pathname', {
//     writable: true,
//     value: pathname
//   });
// };
 
// // Skip createElement warnings but fail tests on any other warning
// console.error = message => {
//   if (!/(React.createElement: type should not be null)/.test(message)) {
//     throw new Error(message);
//   }
// };
 
// // Make Enzyme functions available in all test files without importing
// global.shallow = shallow;
// global.render = render;
// global.mount = mount;
 
// const localStorageMock = (function() {
//   let store = {};
//   return {
//     getItem(key) {
//       return store[key];
//     },
//     setItem(key, value) {
//       store[key] = value.toString();
//     },
//     clear() {
//       store = {};
//     }
//   };
// })();
// Object.defineProperty(window, 'localStorage', { value: localStorageMock });