1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/test/unit/setup.js

21 lines
470 B
JavaScript
Raw Normal View History

2017-11-28 17:05:58 +01:00
/**
* @prettier
2017-11-28 17:05:58 +01:00
* Setup configuration for Jest
* This file includes global settings for the JEST environment.
2017-11-28 17:05:58 +01:00
*/
import 'raf/polyfill';
import { configure } from 'enzyme';
2017-11-28 17:05:58 +01:00
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();
}