-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathApp.test.js
43 lines (41 loc) Β· 1.29 KB
/
App.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React from "react";
import Adapter from "enzyme-adapter-react-16";
import { configure, shallow } from "enzyme";
import { Map, TileLayer } from "react-leaflet";
import demo from "./demo";
import LeafletReactTrackPlayer from "./laeflet-react-track-player";
configure({ adapter: new Adapter() });
it("render default", () => {
const wrapper = shallow(
<div>
<Map center={[47.445745, 40.272891666666666]} zoom={10}>
<LeafletReactTrackPlayer
track={demo}
optionMultyIdxFn={function(p) {
return p.status;
}}
optionsMulty={[
{ color: "#b1b1b1" },
{ color: "#06a9f5" },
{ color: "#202020" },
{ color: "#D10B41" },
{ color: "#78c800" }
]}
useControl={true}
progressFormat={"time"}
customMarker={true}
defaultSpeed={10}
streamData={false}
changeCourseCustomMarker={true}
iconCustomMarker={"/img/mech.svg"}
/>
<TileLayer
attribution='&copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
</Map>
</div>
);
// const output = shallow(wrapper);
expect(wrapper);
});