Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Jun 11, 2018
1 parent 9c0c496 commit 8872f48
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit/ui/map.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,21 @@ test('Map', (t) => {
t.end();
});

t.test('continues camera animation on resize', (t) => {
const map = createMap(),
container = map.getContainer();

map.flyTo({ center: [200, 0], duration: 100 });

Object.defineProperty(container, 'offsetWidth', {value: 250});
Object.defineProperty(container, 'offsetHeight', {value: 250});
map.resize();

t.ok(map.isMoving(), 'map is still moving after resize due to camera animation');

t.end();
});

t.end();
});

Expand Down

0 comments on commit 8872f48

Please sign in to comment.