(center, zoom, dims)
| 461 | }); |
| 462 | |
| 463 | function assertLayout(center, zoom, dims) { |
| 464 | var mapInfo = getMapInfo(gd); |
| 465 | |
| 466 | expect([mapInfo.center.lng, mapInfo.center.lat]) |
| 467 | .toBeCloseToArray(center); |
| 468 | expect(mapInfo.zoom).toBeCloseTo(zoom); |
| 469 | |
| 470 | var divStyle = mapInfo.div.style; |
| 471 | ['left', 'top', 'width', 'height'].forEach(function(p, i) { |
| 472 | expect(parseFloat(divStyle[p])).toBeWithin(dims[i], 8); |
| 473 | }); |
| 474 | } |
| 475 | |
| 476 | assertLayout([-4.710, 19.475], 1.234, [80, 100, 908, 270]); |
| 477 |
no test coverage detected
searching dependent graphs…