mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Chore: resolve dynamic import warnings from pdfjs, again (#9924)
This commit is contained in:
13
src-ui/__mocks__/pdfjs-dist.ts
Normal file
13
src-ui/__mocks__/pdfjs-dist.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const getDocument = jest.fn(() => ({
|
||||
promise: Promise.resolve({ numPages: 3 }),
|
||||
}))
|
||||
|
||||
export const GlobalWorkerOptions = { workerSrc: '' }
|
||||
export const VerbosityLevel = { ERRORS: 0 }
|
||||
|
||||
globalThis.pdfjsLib = {
|
||||
getDocument,
|
||||
GlobalWorkerOptions,
|
||||
VerbosityLevel,
|
||||
AbortException: class AbortException extends Error {},
|
||||
}
|
Reference in New Issue
Block a user