2019-04-05 02:23:40 +07:00
|
|
|
/**
|
|
|
|
* @prettier
|
|
|
|
* Setup configuration for Jest
|
|
|
|
* This file includes global settings for the JEST environment.
|
|
|
|
*/
|
|
|
|
import 'raf/polyfill';
|
|
|
|
import { configure } from 'enzyme';
|
|
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
|
|
|
|
|
|
configure({ adapter: new Adapter() });
|
|
|
|
|
|
|
|
global.__APP_VERSION__ = '1.0.0';
|
2019-05-04 17:13:29 +07:00
|
|
|
global.__VERDACCIO_BASENAME_UI_OPTIONS = {};
|
2019-04-05 02:23:40 +07:00
|
|
|
|
|
|
|
// mocking few DOM methods
|
|
|
|
if (global.document) {
|
|
|
|
document.createRange = jest.fn(() => ({
|
|
|
|
selectNodeContents: () => {},
|
|
|
|
}));
|
|
|
|
document.execCommand = jest.fn();
|
|
|
|
}
|