mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 15:04:27 +07:00
a89f363115
* feat: browser history is aware of basename * test: fix ui options global object * chore: fix comment
22 lines
515 B
JavaScript
22 lines
515 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';
|
|
global.__VERDACCIO_BASENAME_UI_OPTIONS = {};
|
|
|
|
// mocking few DOM methods
|
|
if (global.document) {
|
|
document.createRange = jest.fn(() => ({
|
|
selectNodeContents: () => {},
|
|
}));
|
|
document.execCommand = jest.fn();
|
|
}
|