(expectedTL: Plottable.Point, expectedBR: Plottable.Point, msg: string)
| 99 | div.remove(); |
| 100 | |
| 101 | function assertCorrectRendering(expectedTL: Plottable.Point, expectedBR: Plottable.Point, msg: string) { |
| 102 | const selectionBox = div.select(SELECTION_BOX_CLASSNAME); |
| 103 | const bbox = Plottable.Utils.DOM.elementBBox(selectionBox); |
| 104 | assert.strictEqual(bbox.x, expectedTL.x, msg + " (x-origin)"); |
| 105 | assert.strictEqual(bbox.x, expectedTL.y, msg + " (y-origin)"); |
| 106 | assert.strictEqual(bbox.width, expectedBR.x - expectedTL.x, msg + " (width)"); |
| 107 | assert.strictEqual(bbox.height, expectedBR.y - expectedTL.y, msg + " (height)"); |
| 108 | } |
| 109 | }); |
| 110 | |
| 111 | it("throws an error if the bounds have not been set properly before rendering", () => { |
no outgoing calls
no test coverage detected