Skip to content

Commit

Permalink
Add tests for GeometryCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 27, 2017
1 parent b2a99a5 commit c1edd39
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/turf-helpers/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,11 @@ test('convertArea', t => {
});

// https://github.com/Turfjs/turf/issues/853
// https://github.com/Turfjs/turf/pull/866#discussion_r129873661
test('null geometries', t => {
t.equal(feature(null).geometry, null);
t.equal(featureCollection([feature(null)]).features[0].geometry, null);
t.equal(feature(null).geometry, null, 'feature');
t.equal(featureCollection([feature(null)]).features[0].geometry, null, 'featureCollection');
t.equal(geometryCollection([feature(null).geometry]).geometry.geometries[0], null, 'geometryCollection');
t.equal(geometryCollection([]).geometry.geometries.length, 0, 'geometryCollection -- empty');
t.end();
})
});

0 comments on commit c1edd39

Please sign in to comment.