Skip to content

Commit 864f625

Browse files
committed
fix ci 失败原因 修改了是否支持跨域的值 在fetchrequest ut 执行完需要还原
1 parent b4d1c08 commit 864f625

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/common/util/FetchRequestSpec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { FetchRequest, isCORS, setCORS } from '../../../src/common//util/FetchRequest';
22

33
describe('FetchRequest', () => {
4-
4+
var defaultval = SuperMap.Util.RequestJSONPPromise.limitLength;
5+
var defaltCors=isCORS();
56
it('RequestJSONPPromise', () => {
67
var url = "http://test.supermap.io/examples/leaflet/editor.html#addressMatchService";
78
var params;
@@ -29,5 +30,8 @@ describe('FetchRequest', () => {
2930
expect(SuperMap.Util.RequestJSONPPromise.issue.calls.count()).toBe(4);
3031
});
3132

32-
33+
afterAll(() => {
34+
SuperMap.Util.RequestJSONPPromise.limitLength = defaultval;
35+
setCORS(defaltCors);
36+
});
3337
})

test/test-main-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ import './common/iPortal/iPortalServicesQueryParamSpec.js';
164164
/**common -- thirdparty**/
165165
import './common/thirdparty/elasticsearch/ElasticSearchSpec.js';
166166

167-
// import './common/util/FetchRequestSpec';
167+
import './common/util/FetchRequestSpec';

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