1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-05 06:04:28 +07:00
verdaccio-ui/test/unit/setup.js
2019-04-04 21:23:40 +02:00

21 lines
470 B
JavaScript

/**
* @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';
// mocking few DOM methods
if (global.document) {
document.createRange = jest.fn(() => ({
selectNodeContents: () => {},
}));
document.execCommand = jest.fn();
}