shlink-web-client/jest.config.js

45 lines
1.1 KiB
JavaScript
Raw Normal View History

module.exports = {
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: [
2020-08-22 09:47:19 +03:00
'src/**/*.{js,jsx,ts,tsx}',
'!src/registerServiceWorker.js',
'!src/index.js',
'!src/reducers/index.js',
'!src/**/provideServices.js',
'!src/container/*.js',
],
2019-01-06 01:16:13 +03:00
resolver: 'jest-pnp-resolver',
setupFiles: [
2019-01-06 01:16:13 +03:00
'react-app-polyfill/jsdom',
'<rootDir>/config/setupEnzyme.js',
],
2019-01-06 01:16:13 +03:00
testMatch: [ '<rootDir>/test/**/*.test.{js,jsx,ts,tsx}' ],
testEnvironment: 'jsdom',
testURL: 'http://localhost',
transform: {
'^.+\\.(ts|tsx|js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(ts|tsx|js|jsx|mjs|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
2019-01-06 01:16:13 +03:00
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$',
],
moduleNameMapper: {
'^react-native$': 'react-native-web',
2019-01-06 01:16:13 +03:00
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
},
moduleFileExtensions: [
'web.js',
'js',
2019-01-06 01:16:13 +03:00
'web.ts',
'ts',
'web.tsx',
'tsx',
'json',
'web.jsx',
'jsx',
'node',
],
};