2017-11-28 17:05:58 +01:00
|
|
|
/**
|
2018-09-24 22:04:37 +02:00
|
|
|
* @prettier
|
2017-11-28 17:05:58 +01:00
|
|
|
* Setup configuration for Jest
|
2017-12-03 11:14:17 +01:00
|
|
|
* This file includes global settings for the JEST environment.
|
2017-11-28 17:05:58 +01:00
|
|
|
*/
|
|
|
|
import 'raf/polyfill';
|
2018-10-01 07:06:30 +02:00
|
|
|
import { configure } from 'enzyme';
|
2017-11-28 17:05:58 +01:00
|
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
|
|
|
2018-10-01 07:06:30 +02:00
|
|
|
configure({ adapter: new Adapter() });
|
2018-07-21 20:49:10 +02:00
|
|
|
|
2018-09-24 22:04:37 +02:00
|
|
|
global.__APP_VERSION__ = '1.0.0';
|
|
|
|
|
|
|
|
// mocking few DOM methods
|
|
|
|
if (global.document) {
|
|
|
|
document.createRange = jest.fn(() => ({
|
|
|
|
selectNodeContents: () => {},
|
|
|
|
}));
|
|
|
|
document.execCommand = jest.fn();
|
|
|
|
}
|