types: fix to prop typing (#8134)
This commit is contained in:
+2
-2
@@ -37,10 +37,10 @@ export function mockScrollIntoView() {
|
||||
return fn;
|
||||
}
|
||||
|
||||
export function mockGetBoundingClientRect(rect: DOMRect): () => void {
|
||||
export function mockGetBoundingClientRect(rect: Partial<DOMRect>): () => void {
|
||||
const originMethod = Element.prototype.getBoundingClientRect;
|
||||
|
||||
Element.prototype.getBoundingClientRect = jest.fn(() => rect);
|
||||
Element.prototype.getBoundingClientRect = jest.fn(() => rect as DOMRect);
|
||||
|
||||
return function () {
|
||||
Element.prototype.getBoundingClientRect = originMethod;
|
||||
|
||||
Reference in New Issue
Block a user