зеркало из
1
0
Форкнуть 0
azure-iot-explorer/jestSetup.ts

28 строки
812 B
TypeScript
Исходник Обычный вид История

2019-07-23 19:51:08 +03:00
/***********************************************************
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License
**********************************************************/
import { setIconOptions } from "office-ui-fabric-react/lib/Styling";
import * as Enzyme from "enzyme";
import * as Adapter from "enzyme-adapter-react-16";
global['Headers'] = () => {};
window.parent.fetch = jest.fn();
2019-07-23 19:51:08 +03:00
// suppress icon warnings.
setIconOptions({
disableWarnings: true,
});
Enzyme.configure({ adapter: new Adapter() });
document.execCommand = jest.fn(); // maskedCopyableTextField
// fix for smooth-dnd invocation error in test
Object.defineProperty(global, 'Node', {
value: {firstElementChild: jest.fn()}
});
jest.mock('i18next', () => ({
t: (key: string) => key
}));