diff --git a/test/components/labelTests.ts b/test/components/labelTests.ts index baa0d08870..61bf434080 100644 --- a/test/components/labelTests.ts +++ b/test/components/labelTests.ts @@ -18,7 +18,7 @@ describe("Labels", () => { var text = content.select("text"); var bbox = Plottable.Util.DOM.getBBox(text); - assert.equal(bbox.height, label.availableHeight, "text height === label.minimumHeight()"); + assert.closeTo(bbox.height, label.availableHeight, 0.5, "text height === label.minimumHeight()"); assert.equal(text.node().textContent, "A CHART TITLE", "node's text content is as expected"); svg.remove(); }); diff --git a/test/tests.js b/test/tests.js index f811a536e9..98a5d8b465 100644 --- a/test/tests.js +++ b/test/tests.js @@ -694,7 +694,7 @@ describe("Labels", function () { assert.lengthOf(textChildren, 1, "There is one text node in the parent element"); var text = content.select("text"); var bbox = Plottable.Util.DOM.getBBox(text); - assert.equal(bbox.height, label.availableHeight, "text height === label.minimumHeight()"); + assert.closeTo(bbox.height, label.availableHeight, 0.5, "text height === label.minimumHeight()"); assert.equal(text.node().textContent, "A CHART TITLE", "node's text content is as expected"); svg.remove(); });