Add element scrollTo mock

This commit is contained in:
shamoon
2025-11-19 23:31:21 -08:00
parent 598b6e4e21
commit b31c81f1e0

View File

@@ -145,6 +145,10 @@ HTMLCanvasElement.prototype.getContext = <
typeof HTMLCanvasElement.prototype.getContext
>jest.fn()
if (!HTMLElement.prototype.scrollTo) {
HTMLElement.prototype.scrollTo = jest.fn()
}
jest.mock('uuid', () => ({
v4: jest.fn(() =>
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char: string) => {