1 describe('Bounds', function() {
4 beforeEach(function() {
15 describe('constructor', function() {
16 it('should create bounds with proper min & max on (Point, Point)', function() {
17 expect(a
.min
).toEqual(new L
.Point(14, 12));
18 expect(a
.max
).toEqual(new L
.Point(30, 40));
20 it('should create bounds with proper min & max on (Point[])', function() {
21 expect(b
.min
).toEqual(new L
.Point(14, 12));
22 expect(b
.max
).toEqual(new L
.Point(30, 40));
26 describe('#extend', function() {
27 it('should extend the bounds to contain the given point', function() {
28 a
.extend(new L
.Point(50, 20));
29 expect(a
.min
).toEqual(new L
.Point(14, 12));
30 expect(a
.max
).toEqual(new L
.Point(50, 40));
32 b
.extend(new L
.Point(25, 50));
33 expect(b
.min
).toEqual(new L
.Point(14, 12));
34 expect(b
.max
).toEqual(new L
.Point(30, 50));
38 describe('#getCenter', function() {
39 it('should return the center point', function() {
40 expect(a
.getCenter()).toEqual(new L
.Point(22, 26));