fix: flaky snapshot tests with floating point precision issues (#8049)

This commit is contained in:
Marcel Mraz 2024-05-23 10:51:01 +01:00 committed by GitHub
parent defd34923a
commit 661d6a4a75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 205 additions and 188 deletions

View file

@ -1064,7 +1064,7 @@ describe("textWysiwyg", () => {
expect([h.elements[1].x, h.elements[1].y]).toMatchInlineSnapshot(`
[
85,
4.999999999999986,
"5.00000",
]
`);
@ -1109,8 +1109,8 @@ describe("textWysiwyg", () => {
UI.resize(rectangle, "ne", [rectangle.x + 100, rectangle.y - 100]);
expect([h.elements[1].x, h.elements[1].y]).toMatchInlineSnapshot(`
[
374.99999999999994,
-535.0000000000001,
"375.00000",
"-535.00000",
]
`);
});