forked from gooddata/gooddata-react-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.ts
More file actions
21 lines (19 loc) · 661 Bytes
/
Copy pathjest.setup.ts
File metadata and controls
21 lines (19 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// (C) 2019 GoodData Corporation
import { configure } from "enzyme";
import * as EnzymeAdapter from "enzyme-adapter-react-16";
import "jest-enzyme";
import * as requestAnimationFrame from "raf";
import "@formatjs/intl-pluralrules";
import "@formatjs/intl-pluralrules/polyfill-locales";
requestAnimationFrame.polyfill();
configure({ adapter: new EnzymeAdapter() });
// from https://github.com/mapbox/mapbox-gl-js/issues/3436
jest.mock("mapbox-gl/dist/mapbox-gl", () => ({
GeolocateControl: jest.fn(),
Map: jest.fn(() => ({
addControl: jest.fn(),
on: jest.fn(),
remove: jest.fn(),
})),
NavigationControl: jest.fn(),
}));