forked from SuperMap/iClient-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMapServiceSpec.js
More file actions
31 lines (28 loc) · 1.04 KB
/
MapServiceSpec.js
File metadata and controls
31 lines (28 loc) · 1.04 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
28
29
30
31
require('../../../src/leaflet/services/MapService');
var url = GlobeParameter.ChinaURL;
describe('leaflet_MapService', function () {
var originalTimeout;
beforeEach(function () {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000;
});
afterEach(function () {
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
});
it('initialize', function () {
var options = {
projection: 'EPSG:3857'
};
var mapService = L.supermap.mapService(url, options);
expect(mapService.options.projection).toBe('EPSG:3857');
expect(mapService.url).toEqual(url);
});
it('getMapInfo', function () {
L.supermap.mapService(url).getMapInfo(function (serviceResult) {
expect(serviceResult).not.toBeNull();
expect(serviceResult.type).toBe("processCompleted");
expect(serviceResult.result).not.toBeNull();
expect(serviceResult.object.options.method).toBe("GET");
});
});
});