Chore: resolve dynamic import warnings from pdfjs, again (#9924)

This commit is contained in:
shamoon authored and GitHub committed 2025-05-12 21:04:18 -07:00
1 parent 344cc70cd5
commit 2c9e690dfb
2 files changed
+14 -16

No files matched your search

+13
View 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 {},
}