From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 2 May 2022 08:02:28 +0000 (-0700) Subject: setup-jest compatibility with v28 X-Git-Tag: v1.8.0-beta.rc1~143^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F860%2Fhead;p=thirdparty%2Fpaperless-ngx.git setup-jest compatibility with v28 --- diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index 5ada7e7c6b..876946e2be 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -1,4 +1,4 @@ -import 'jest-preset-angular/setup-jest' +import { jest } from '@jest/globals' /* global mocks for jsdom */ const mock = () => { @@ -26,5 +26,6 @@ Object.defineProperty(document.body.style, 'transform', { }, }) -/* output shorter and more meaningful Zone error stack traces */ -// Error.stackTraceLimit = 2 +HTMLCanvasElement.prototype.getContext = < + typeof HTMLCanvasElement.prototype.getContext +>jest.fn()