mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Basic tests for padByMeters
This commit is contained in:
@@ -51,6 +51,18 @@ describe("iD.geo.Extent", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#padByMeters", function () {
|
||||
it("does not change centerpoint of an extent", function () {
|
||||
var min = [0, 0], max = [5, 10];
|
||||
expect(iD.geo.Extent(min, max).padByMeters(100).center()).to.eql([2.5, 5]);
|
||||
});
|
||||
|
||||
it("does not affect the extent with a pad of zero", function () {
|
||||
var min = [0, 0], max = [5, 10];
|
||||
expect(iD.geo.Extent(min, max).padByMeters(0)[0]).to.eql([0, 0]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#extend", function () {
|
||||
it("does not modify self", function () {
|
||||
var extent = iD.geo.Extent([0, 0], [0, 0]);
|
||||
|
||||
Reference in New Issue
Block a user