Optional
toleranceAllowed tolerance for the size difference, expressed as a percentage (%) of the reference element's dimensions.
The matcher will pass if both the width and height differences between the target and reference elements are within this percentage.
For example, a tolerancePercent
of 5 means the target element's width and height can differ by up to
5% from the reference element's size without failing the assertion.
If omitted, the default tolerance is 0
, requiring exact size equality.
Options for the toHaveSameSizeAs matcher.