forked from react-pdf-viewer/react-pdf-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
20 lines (20 loc) · 904 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module.exports = {
testEnvironment: 'jsdom',
// Uncomment the `testMatch` option when we want to run a specific test case
// testMatch: ['<rootDir>/packages/page-navigation/__tests__/CurrentPageLabel.test.tsx'],
testRegex: ['(/__tests__/.*|(\\.|/)(test|spec))\\.tsx$'],
moduleNameMapper: {
'@react-pdf-viewer/core': '<rootDir>/packages/core/src',
'@react-pdf-viewer/default-layout': '<rootDir>/packages/default-layout/src',
// In order to load the PDF document in node, we use the ES5 build
// For pdfjs-dist 2.7.570+
'pdfjs-dist': '<rootDir>/node_modules/pdfjs-dist/legacy/build/pdf',
// For pdfjs-dist 2.6.347
// 'pdfjs-dist': '<rootDir>/node_modules/pdfjs-dist/es5/build/pdf',
},
setupFilesAfterEnv: ['<rootDir>/configs/setupTests.ts'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
verbose: true,
};