Skip to content

Commit

Permalink
Fixed off-by-small-number issue in label test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Lan committed Aug 13, 2014
1 parent 9a15cca commit 71614cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/components/labelTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit 71614cf

Please sign in to comment.