Skip to content

Commit

Permalink
tests: update test precision on centers
Browse files Browse the repository at this point in the history
  • Loading branch information
mwargan committed Mar 7, 2024
1 parent 34ddf78 commit e42a59a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stories/BaseModal.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const DefaultOpened: Story = {
// The modals left edge to the left side of the screen should be the same as the right edge of the canvas
const leftModalDistance = modalRect.left - canvasRect.left;
const rightCanvasDistance = canvasRect.right - modalRect.right;
// We round to the nearest pixel so we don't fail on overly precise measurements
expect(leftModalDistance).toBeCloseTo(rightCanvasDistance, 0);
},
};
Expand Down

0 comments on commit e42a59a

Please sign in to comment.