]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
setup-jest compatibility with v28 860/head
authorshamoon <4887959+shamoon@users.noreply.github.com>
Mon, 2 May 2022 08:02:28 +0000 (01:02 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Mon, 2 May 2022 08:24:24 +0000 (01:24 -0700)
src-ui/setup-jest.ts

index 5ada7e7c6bf08db4695b9c74020a87a74c0299f0..876946e2bef7c0c258138e37eb822e64b08205af 100644 (file)
@@ -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()