Skip to content

Commit 0823f10

Browse files
committed
优化ut 只有一个ut用到 json可以写在测试代码里面 review by songym
1 parent 485e9e1 commit 0823f10

File tree

2 files changed

+111
-111
lines changed

2 files changed

+111
-111
lines changed

test/leaflet/widgets/openfile/OpenFileViewSpec.js

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,117 @@ describe('leaflet_openfile_OpenFileView', () => {
3434
});
3535

3636
it('readFile', (done) => {
37+
var china={
38+
"type": "FeatureCollection",
39+
"features": [
40+
{
41+
"type": "Feature",
42+
"properties": {
43+
"id": "81",
44+
"name": "香港",
45+
"cp": [
46+
114.2578,
47+
22.3242
48+
],
49+
"childNum": 1
50+
},
51+
"geometry": {
52+
"type": "Polygon",
53+
"coordinates": [
54+
[
55+
[
56+
114.6094,
57+
22.4121
58+
],
59+
[
60+
114.5215,
61+
22.1484
62+
],
63+
[
64+
114.3457,
65+
22.1484
66+
],
67+
[
68+
113.9063,
69+
22.1484
70+
],
71+
[
72+
113.8184,
73+
22.1924
74+
],
75+
[
76+
113.9063,
77+
22.4121
78+
],
79+
[
80+
114.1699,
81+
22.5439
82+
],
83+
[
84+
114.3457,
85+
22.5439
86+
],
87+
[
88+
114.4336,
89+
22.5439
90+
],
91+
[
92+
114.4336,
93+
22.4121
94+
],
95+
[
96+
114.6094,
97+
22.4121
98+
]
99+
]
100+
]
101+
}
102+
},
103+
{
104+
"type": "Feature",
105+
"properties": {
106+
"id": "82",
107+
"name": "澳门",
108+
"cp": [
109+
113.5547,
110+
22.1484
111+
],
112+
"childNum": 1
113+
},
114+
"geometry": {
115+
"type": "Polygon",
116+
"coordinates": [
117+
[
118+
[
119+
113.5986,
120+
22.1649
121+
],
122+
[
123+
113.6096,
124+
22.1265
125+
],
126+
[
127+
113.5547,
128+
22.11
129+
],
130+
[
131+
113.5437,
132+
22.2034
133+
],
134+
[
135+
113.5767,
136+
22.2034
137+
],
138+
[
139+
113.5986,
140+
22.1649
141+
]
142+
]
143+
]
144+
}
145+
}
146+
]
147+
};
37148

38149
var openFile = L.supermap.widgets.openFile().addTo(map).setPosition('bottomleft');
39150

test/resources/OpenFileView.js

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)