-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (26 loc) · 978 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', 'ky'].join('|');
module.exports = {
collectCoverageFrom: [
'**/(lib|src)/**/*.{js,jsx}',
'!**/node_modules/**',
'!**/test/jest/**',
],
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',
},
testMatch: ['**/(lib|src)/**/?(*.)test.{js,jsx}'],
testPathIgnorePatterns: ['/node_modules/', '/test/bigtest/', '/test/ui-testing/'],
setupFiles: [
path.join(__dirname, './test/jest/setupTests.js'),
'jest-canvas-mock'
],
setupFilesAfterEnv: [path.join(__dirname, './test/jest/jest.setup.js')],
};