mockRect function test
Last updated: 2026-03-01T23:25:47.096Z
Metrics
LOC: 14
Complexity: 1
Params: 3
Signature
mockRect(el: HTMLElement, width: number, height: number): : void
Source Code
function mockRect(el: HTMLElement, width: number, height: number): void {
el.getBoundingClientRect = () =>
({
width,
height,
top: 0,
left: 0,
bottom: height,
right: width,
x: 0,
y: 0,
toJSON: () => ({}),
}) as DOMRect;
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| isVisible | uses |
| isNotCustomSelect | uses |
| buildNativeField | uses |
| mockRect | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| mockRect | calls |