fix setView test, #1420
This commit is contained in:
parent
e3d6dd688f
commit
b84b83bf93
@ -36,14 +36,11 @@ describe("Map", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("#setView", function () {
|
describe("#setView", function () {
|
||||||
it("sets the view of the map", function (done) {
|
it("sets the view of the map", function () {
|
||||||
expect(map.setView([51.505, -0.09], 13)).toBe(map);
|
expect(map.setView([51.505, -0.09], 13)).toBe(map);
|
||||||
expect(map.getZoom()).toBe(13);
|
expect(map.getZoom()).toBe(13);
|
||||||
|
|
||||||
window.setTimeout(function() {
|
expect(map.getCenter().distanceTo([51.505, -0.09])).toBeLessThan(5);
|
||||||
expect(map.getCenter().distanceTo([51.505, -0.09])).toBeLessThan(1);
|
|
||||||
done();
|
|
||||||
}, 500);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user