From b31c81f1e0c42cc6bad640bbea6c8b9605407437 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 19 Nov 2025 23:31:21 -0800 Subject: [PATCH] Add element scrollTo mock --- src-ui/setup-jest.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index c7bcabddb..df5e9d175 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -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) => {