shlink-web-client/jest.config.js

40 lines
1.2 KiB
JavaScript
Raw Normal View History

module.exports = {
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: [
2021-09-19 11:57:36 +03:00
'src/**/*.{ts,tsx}',
'!src/*.{ts,tsx}',
2020-08-29 14:51:53 +03:00
'!src/reducers/index.ts',
'!src/**/provideServices.ts',
'!src/container/*.ts',
],
2021-09-19 11:31:53 +03:00
coverageThreshold: {
global: {
statements: 90,
2023-03-19 12:46:52 +03:00
branches: 85,
functions: 90,
lines: 90,
2021-09-19 11:31:53 +03:00
},
},
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.ts'],
testMatch: ['<rootDir>/test/**/*.test.{ts,tsx}'],
2019-01-06 01:16:13 +03:00
testEnvironment: 'jsdom',
2022-05-01 11:19:38 +03:00
testEnvironmentOptions: {
url: 'http://localhost',
},
transform: {
'^.+\\.(ts|tsx|js)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.scss$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(ts|tsx|js|json|scss)$)': '<rootDir>/config/jest/fileTransform.js',
},
2019-01-06 01:16:13 +03:00
transformIgnorePatterns: [
'node_modules\/(?!(\@react-leaflet|react-leaflet|leaflet|react-chartjs-2|react-colorful)\/)',
'^.+\\.module\\.scss$',
2019-01-06 01:16:13 +03:00
],
moduleNameMapper: {
'^.+\\.module\\.scss$': 'identity-obj-proxy',
'react-chartjs-2': '<rootDir>/node_modules/react-chartjs-2/dist/index.js',
'uuid': '<rootDir>/node_modules/uuid/dist/index.js',
},
moduleFileExtensions: ['js', 'ts', 'tsx', 'json'],
};