forked from folio-org/ui-tenant-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (26 loc) · 962 Bytes
/
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
// 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',
},
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')],
};