Test setView. The setTimeout can be removed when #1420 is fixed.
This commit is contained in:
parent
8e176f48aa
commit
1b03d5d0b4
@ -35,6 +35,18 @@ describe("Map", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("#setView", function () {
|
||||||
|
it("sets the view of the map", function (done) {
|
||||||
|
expect(map.setView([51.505, -0.09], 13)).toBe(map);
|
||||||
|
expect(map.getZoom()).toBe(13);
|
||||||
|
|
||||||
|
window.setTimeout(function() {
|
||||||
|
expect(map.getCenter().distanceTo([51.505, -0.09])).toBeLessThan(1);
|
||||||
|
done();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("#getBounds", function () {
|
describe("#getBounds", function () {
|
||||||
it("is safe to call from within a moveend callback during initial " +
|
it("is safe to call from within a moveend callback during initial " +
|
||||||
"load (#1027)", function () {
|
"load (#1027)", function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user