Skip to content

Commit 2340a50

Browse files
fix ut
1 parent bb509cd commit 2340a50

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/openlayers/overlay/VectorTileSuperMapRestSpec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ describe('openlayers_VectorTileSuperMapRest', () => {
9797
beforeEach(() => {
9898
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
9999
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
100-
101-
spyGet = spyOn(FetchRequest, 'get').and.callFake((url) => mockCallback(url, 'GET'));
102100
spyPost = spyOn(FetchRequest, 'post').and.callFake((url) => mockCallback(url, 'POST'));
103101
spyCommit = spyOn(FetchRequest, 'commit').and.callFake((method, url) => mockCallback(url, method));
104102
});
@@ -116,6 +114,7 @@ describe('openlayers_VectorTileSuperMapRest', () => {
116114
});
117115

118116
it('initialize', (done) => {
117+
spyGet = spyOn(FetchRequest, 'get').and.callFake((url) => mockCallback(url, 'GET'));
119118
new MapService(url).getMapInfo((serviceResult) => {
120119
map = new Map({
121120
target: 'map',
@@ -144,6 +143,8 @@ describe('openlayers_VectorTileSuperMapRest', () => {
144143
});
145144
});
146145
it('custom_tileLoadFunction', (done) => {
146+
spyGet = spyOn(FetchRequest, 'get').and.callFake((url) => mockCallback(url, 'GET'));
147+
147148
var spy = jasmine.createSpy('test');
148149
var tileLoadFunction = (tile) => {
149150
tile.setLoader(() => {
@@ -175,6 +176,8 @@ describe('openlayers_VectorTileSuperMapRest', () => {
175176
});
176177

177178
it('mvt_decrypt ', (done) => {
179+
spyGet = spyOn(FetchRequest, 'get').and.callFake((url) => mockCallback(url, 'GET'));
180+
178181
const spy = jasmine.createSpy('test');
179182
const serviceKey = 'l3nQtAUM4li87qMfO68exInHVFQ5gS3a6pb8ySIbib8=';
180183
const spyEncrypt = spyOn(EncryptRequest.prototype, 'request').and.callFake(() => ({ json: () => Promise.resolve(serviceKey)}));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy