Add map and set guards to tests to fix travis runs.

This commit is contained in:
John-David Dalton
2015-09-06 22:41:07 -07:00
parent d81e029ec0
commit 7863256de5

View File

@@ -7416,6 +7416,7 @@
});
test('should partial match maps', 3, function() {
if (Map) {
var objects = [{ 'a': new Map }, { 'a': new Map }];
objects[0].a.set('a', 1);
objects[1].a.set('a', 1);
@@ -7441,9 +7442,14 @@
actual = _.filter(objects, predicate);
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should partial match sets', 3, function() {
if (Set) {
var objects = [{ 'a': new Set }, { 'a': new Set }];
objects[0].a.add(1);
objects[1].a.add(1);
@@ -7469,6 +7475,10 @@
actual = _.filter(objects, predicate);
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should match properties when `object` is not a plain object', 1, function() {
@@ -9636,6 +9646,7 @@
});
test('should partial match maps', 3, function() {
if (Map) {
var objects = [{ 'a': new Map }, { 'a': new Map }];
objects[0].a.set('a', 1);
objects[1].a.set('a', 1);
@@ -9656,9 +9667,14 @@
actual = _.filter(objects, _.matches({ 'a': map }));
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should partial match sets', 3, function() {
if (Set) {
var objects = [{ 'a': new Set }, { 'a': new Set }];
objects[0].a.add(1);
objects[1].a.add(1);
@@ -9679,6 +9695,10 @@
actual = _.filter(objects, _.matches({ 'a': set }));
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should match properties when `object` is not a plain object', 1, function() {
@@ -9998,6 +10018,7 @@
deepEqual(actual, [objects[0]]);
});
test('should partial match maps', 3, function() {
if (Map) {
var objects = [{ 'a': new Map }, { 'a': new Map }];
objects[0].a.set('a', 1);
objects[1].a.set('a', 1);
@@ -10018,9 +10039,14 @@
actual = _.filter(objects, _.matchesProperty('a', map));
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should partial match sets', 3, function() {
if (Set) {
var objects = [{ 'a': new Set }, { 'a': new Set }];
objects[0].a.add(1);
objects[1].a.add(1);
@@ -10041,6 +10067,10 @@
actual = _.filter(objects, _.matchesProperty('a', set));
deepEqual(actual, []);
}
else {
skipTest(3);
}
});
test('should match properties when `srcValue` is not a plain object', 1, function() {