Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Nov 26, 2019
1 parent 808f46a commit 70ad780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions test/unit/ui/handler/touch_zoom_rotate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ test('TouchZoomRotateHandler fires zoomstart, zoom, and zoomend events at approp

simulate.touchend(map.getCanvas(), {touches: []});
map._renderTaskQueue.run();
t.equal(zoomstart.callCount, 1);
t.equal(zoom.callCount, 2);
// incremented because inertia starts a second zoom
t.equal(zoomstart.callCount, 2);
t.equal(zoom.callCount, 3);
t.equal(zoomend.callCount, 1);

map.remove();
Expand Down Expand Up @@ -142,8 +143,9 @@ test('TouchZoomRotateHandler starts zoom immediately when rotation disabled', (t

simulate.touchend(map.getCanvas(), {touches: []});
map._renderTaskQueue.run();
t.equal(zoomstart.callCount, 1);
t.equal(zoom.callCount, 2);
// incremented because inertia starts a second zoom
t.equal(zoomstart.callCount, 2);
t.equal(zoom.callCount, 3);
t.equal(zoomend.callCount, 1);

map.remove();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/ui/map.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ test('Map', (t) => {

t.test('#getMinZoom', (t) => {
const map = createMap(t, {zoom: 0});
t.equal(map.getMinZoom(), 0, 'returns default value');
t.equal(map.getMinZoom(), -2, 'returns default value');
map.setMinZoom(10);
t.equal(map.getMinZoom(), 10, 'returns custom value');
t.end();
Expand Down

0 comments on commit 70ad780

Please sign in to comment.