Leaflet/spec/suites/geo/LatLngBoundsSpec.js

23 lines
543 B
JavaScript
Raw Normal View History

describe('LatLngBounds', function() {
var a, c;
beforeEach(function() {
2012-10-07 02:01:17 +08:00
a = new L.LatLngBounds(
new L.LatLng(14, 12),
new L.LatLng(30, 40));
c = new L.LatLngBounds();
});
describe('#isValid', function() {
it('should return true if properly set up', function() {
expect(a.isValid()).toBeTruthy();
});
it('should return false if is invalid', function() {
expect(c.isValid()).toBeFalsy();
});
it('should be valid if extended', function() {
c.extend([0, 0]);
expect(c.isValid()).toBeTruthy();
});
});
});