forked from axa-ch-webhub-cloud/pattern-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
36 lines (34 loc) · 1.07 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
34
35
36
const path = require('path');
// eslint-disable-next-line import/no-dynamic-require
const { gatherAllVersions } = require(path.resolve(
__dirname,
'scripts',
'build',
'version_info.js'
));
const stringifiedVersionInfo = gatherAllVersions(path.resolve(__dirname));
module.exports = {
globals: { __VERSION_INFO__: JSON.parse(stringifiedVersionInfo) },
collectCoverageFrom: [
'src/**/*.js',
'!**/dist/**',
'!**/lib/**',
'!**/demo/**',
'!**/00-materials/icons/**',
'!**/00-materials/images/**',
'!**/ui.test.js',
'!**/story.js',
'!**/index.react.js',
],
coverageDirectory: '.coverage',
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.js'],
testMatch: ['<rootDir>/src/**/unit.test.{js,jsx,mjs}'],
transform: {
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|mjs|css|json)$)':
'<rootDir>/config/jest/fileTransform.js',
'^.+\\.(js|jsx)$': '<rootDir>config/jest/jestPreprocess.js',
},
transformIgnorePatterns: ['/node_modules\\/(?![lit])/'],
moduleFileExtensions: ['js', 'jsx', 'json'],
};