Skip to content

Commit 9633dd3

Browse files
author
宗羽
committed
test(testcase) fix testcase
- testcase fail in 0.10.x for not support es6 Map
1 parent 8c2c5ab commit 9633dd3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/map.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ describe('map.test.js', function () {
162162
});
163163

164164
it('should write es6 Map to java.util.Map', function() {
165+
if (typeof Map !== 'function') {
166+
// pass if not support es6 Map
167+
return;
168+
}
169+
165170
var map = new Map();
166171
map.set({ '$class': 'java.lang.Long', '$': 123 }, 123456);
167172
map.set({ '$class': 'java.lang.Long', '$': 123456 }, 123);
@@ -349,6 +354,11 @@ describe('map.test.js', function () {
349354
});
350355

351356
it('should write es6 Map to java.util.Map', function() {
357+
if (typeof Map !== 'function') {
358+
// pass if not support es6 Map
359+
return;
360+
}
361+
352362
var map = new Map();
353363
map.set({ '$class': 'java.lang.Long', '$': 123 }, 123456);
354364
map.set({ '$class': 'java.lang.Long', '$': 123456 }, 123);

0 commit comments

Comments
 (0)