fix: compute container height from bound text correctly (#6273)

* fix: compute container height from bound text correctly

* fix specs

* Add tests
This commit is contained in:
Aakansha Doshi 2023-02-23 17:39:02 +05:30 committed by GitHub
parent 9659254fd6
commit 0e95e2b386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 78 additions and 4 deletions

View file

@ -233,7 +233,7 @@ describe("Test measureText", () => {
type: "ellipse",
...params,
});
expect(computeContainerHeightForBoundText(element, 150)).toEqual(212);
expect(computeContainerHeightForBoundText(element, 150)).toEqual(226);
});
it("should compute container height correctly for diamond", () => {
@ -241,7 +241,7 @@ describe("Test measureText", () => {
type: "diamond",
...params,
});
expect(computeContainerHeightForBoundText(element, 150)).toEqual(300);
expect(computeContainerHeightForBoundText(element, 150)).toEqual(320);
});
});