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) => {