2020-02-09 17:16:10 +01:00
|
|
|
module.exports = {
|
|
|
|
rootDir: '../',
|
|
|
|
transform: {
|
2020-02-25 20:40:46 +01:00
|
|
|
'^.+\\.[t|j]sx?$': ['babel-jest', { configFile: './tests/babel.config.js' }]
|
2020-02-09 17:16:10 +01:00
|
|
|
},
|
|
|
|
moduleNameMapper: {
|
|
|
|
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
|
|
|
|
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
|
|
|
'<rootDir>/tests/__mocks__/file-mock.js',
|
|
|
|
'\\.svg': '<rootDir>/tests/__mocks__/svgr-mock.js'
|
|
|
|
},
|
|
|
|
testMatch: ['**/?(*.)+(spec|test).jsx'],
|
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'<rootDir>/src/renderer/.next',
|
|
|
|
'<rootDir>/src/renderer/out',
|
|
|
|
'<rootDir>/node_modules',
|
2020-10-10 17:36:39 +02:00
|
|
|
'<rootDir>/app',
|
2020-02-09 17:16:10 +01:00
|
|
|
'<rootDir>/dist',
|
|
|
|
'<rootDir>/coverage'
|
|
|
|
],
|
|
|
|
testURL: 'http://localhost',
|
2020-02-25 04:10:06 +01:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.js'],
|
2020-02-09 17:16:10 +01:00
|
|
|
runner: '@jest-runner/electron',
|
|
|
|
testEnvironment: '@jest-runner/electron/environment',
|
2020-02-25 16:57:39 +01:00
|
|
|
coverageDirectory: '<rootDir>/coverage/',
|
2020-02-09 17:16:10 +01:00
|
|
|
collectCoverage: true,
|
|
|
|
collectCoverageFrom: [
|
2020-02-25 16:57:39 +01:00
|
|
|
'<rootDir>/src/renderer/**/*.{js,jsx}',
|
|
|
|
'!<rootDir>/src/renderer/next.config.js',
|
|
|
|
'!<rootDir>/src/renderer/out/**/*',
|
|
|
|
'!<rootDir>/src/renderer/.next/**/*',
|
2020-02-09 17:16:10 +01:00
|
|
|
'!**/node_modules/**'
|
|
|
|
]
|
|
|
|
}
|