-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (30 loc) · 1.13 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// eslint-disable-next-line import/no-extraneous-dependencies
const path = require('path');
const esModules = ['@folio'].join('|');
module.exports = {
collectCoverageFrom: [
'**/(lib|src)/**/*.{js,jsx}',
'!**/node_modules/**',
'!**/test/**',
],
coverageDirectory: './artifacts/coverage-jest/',
coverageReporters: ['lcov'],
reporters: ['jest-junit', 'default'],
// transform: {
// '^.+\\.(js|jsx)$': path.join(__dirname, './test/jest/jest-transformer.js'),
// },
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
moduleNameMapper: {
'^.+\\.(css)$': 'identity-obj-proxy',
'^.+\\.(svg)$': 'identity-obj-proxy',
'ky': 'ky/umd',
'uuid': require.resolve('uuid'), // https://github.com/uuidjs/uuid/issues/451
},
testEnvironment: 'jsdom',
testMatch: ['**/(lib|src)/**/?(*.)test.{js,jsx}'],
testPathIgnorePatterns: ['/node_modules/', '/test/ui-testing/', '/test/bigtest/'],
// setupFiles: [path.join(__dirname, './test/jest/setupTests.js')],
// setupFilesAfterEnv: [path.join(__dirname, './test/jest/jest.setup.js')],
roots: ['<rootDir>', './src'],
modulePaths: ['<rootDir>', './src'],
};