Skip to content

Commit

Permalink
Add a unit test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zmiao committed Aug 18, 2020
1 parent 5a29a8a commit 30b73d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unit/source/tile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ test('querySourceFeatures', (t) => {
result = [];
tile.querySourceFeatures(result, {filter: ['!=', 'oneway', true]});
t.equal(result.length, 0);
result = [];
const polygon = {type: "Polygon", coordinates: [[[-91, -1], [-89, -1], [-89, 1], [-91, 1], [-91, -1]]]};
tile.querySourceFeatures(result, {filter: ['within', polygon]});
t.equal(result.length, 1);
t.end();
});

Expand Down

0 comments on commit 30b73d9

Please sign in to comment.