Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
anandthakker committed Mar 3, 2018
1 parent 39cdf3f commit 68a9dd0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file added test/fixtures/multipolygon-with-closepath.pbf
Binary file not shown.
12 changes: 12 additions & 0 deletions test/parse.test.js
Expand Up @@ -211,3 +211,15 @@ test('https://github.com/mapbox/mapbox-gl-js/issues/1019', function(t) {
t.ok(tile.layers["water"].feature(1).loadGeometry());
t.end();
});

test('https://github.com/mapbox/vector-tile-js/issues/60', function(t) {
var data = fs.readFileSync(__dirname + '/fixtures/multipolygon-with-closepath.pbf');
var tile = new VectorTile(new Protobuf(data));
for (var id in tile.layers) {
var layer = tile.layers[id];
for (var i = 0; i < layer.length; i++) {
layer.feature(i).loadGeometry();
}
}
t.end();
});

0 comments on commit 68a9dd0

Please sign in to comment.