forked from SuperMap/iClient-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilSpec.js
More file actions
27 lines (26 loc) · 1.21 KB
/
UtilSpec.js
File metadata and controls
27 lines (26 loc) · 1.21 KB
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
import { isSameRasterLayer } from '../../../../src/common/mapping/utils/util';
describe('util', () => {
it('isSameRasterLayer', (done) => {
let res = isSameRasterLayer(
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/rest/maps/China'] },
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/rest/maps/ChinaDark'] }
);
expect(res).toBeFalse();
let res1 = isSameRasterLayer(
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China'] },
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China/tileImage.png?a=1234'] }
);
expect(res1).toBeTruthy();
let res12 = isSameRasterLayer(
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China'] },
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China?a=1234'] }
);
expect(res12).toBeTruthy();
let res3 = isSameRasterLayer(
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China?a=1234'] },
{ type: 'raster', tiles: ['http:17.0.0.1:8190/iserver/map-China100/rest/maps/China/tileImage.png?a=1234'] }
);
expect(res3).toBeTruthy();
done();
});
});