Skip to content

Commit 14b1c0f

Browse files
committed
Split test
1 parent 253108a commit 14b1c0f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/feature_filter/feature_filter.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function legacyFilterTests(createFilterExpr) {
445445
expect(f({zoom: 0}, {properties: {}})).toBe(true);
446446
});
447447

448-
test('!=, $type', () => {
448+
test('!=, $type, Point', () => {
449449
const fPoint = createFilterExpr(['!=', '$type', 'Point']).filter;
450450
expect(fPoint({zoom: 0}, {type: 0})).toBe(true); // Unknown geometry-type
451451
expect(fPoint({zoom: 0}, {type: 1, geometry: [[{x: 0, y: 0}]]})).toBe(false); // Point geometry-type
@@ -464,7 +464,9 @@ function legacyFilterTests(createFilterExpr) {
464464
expect(fPoint({zoom: 0}, {type: 'MultiLineString'})).toBe(true);
465465
expect(fPoint({zoom: 0}, {type: 'Polygon'})).toBe(true);
466466
expect(fPoint({zoom: 0}, {type: 'MultiPolygon'})).toBe(true);
467+
});
467468

469+
test('!=, $type, LineString', () => {
468470
const fLineString = createFilterExpr(['!=', '$type', 'LineString']).filter;
469471
expect(fLineString({zoom: 0}, {type: 0})).toBe(true); // Unknown geometry-type
470472
expect(fLineString({zoom: 0}, {type: 1, geometry: [[{x: 0, y: 0}]]})).toBe(true); // Point geometry-type
@@ -483,7 +485,9 @@ function legacyFilterTests(createFilterExpr) {
483485
expect(fLineString({zoom: 0}, {type: 'MultiLineString'})).toBe(false);
484486
expect(fLineString({zoom: 0}, {type: 'Polygon'})).toBe(true);
485487
expect(fLineString({zoom: 0}, {type: 'MultiPolygon'})).toBe(true);
488+
});
486489

490+
test('!=, $type, Polygon', () => {
487491
const fPolygon = createFilterExpr(['!=', '$type', 'Polygon']).filter;
488492
expect(fPolygon({zoom: 0}, {type: 0})).toBe(true); // Unknown geometry-type
489493
expect(fPolygon({zoom: 0}, {type: 1, geometry: [[{x: 0, y: 0}]]})).toBe(true); // Point geometry-type
@@ -502,7 +506,9 @@ function legacyFilterTests(createFilterExpr) {
502506
expect(fPolygon({zoom: 0}, {type: 'MultiLineString'})).toBe(true);
503507
expect(fPolygon({zoom: 0}, {type: 'Polygon'})).toBe(false);
504508
expect(fPolygon({zoom: 0}, {type: 'MultiPolygon'})).toBe(false);
509+
});
505510

511+
test('!=, $type, Unknown', () => {
506512
const fUnknown = createFilterExpr(['!=', '$type', 'Unknown']).filter;
507513
expect(fUnknown({zoom: 0}, {type: 0})).toBe(false); // Unknown geometry-type
508514
expect(fUnknown({zoom: 0}, {type: 1, geometry: [[{x: 0, y: 0}]]})).toBe(true); // Point geometry-type

0 commit comments

Comments
 (0)