2019-12-08 17:27:44 +01:00
|
|
|
module.exports = {
|
2021-09-12 22:30:45 +02:00
|
|
|
rootDir: '../',
|
|
|
|
transform: {
|
|
|
|
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './jest/babel.config.js' }]
|
2019-12-08 17:27:44 +01:00
|
|
|
},
|
|
|
|
moduleNameMapper: {
|
|
|
|
'.+\\.(css|styl|less|sass|scss)$': '<rootDir>/jest/__mocks__/styleMock.js',
|
|
|
|
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
|
|
|
'<rootDir>/jest/__mocks__/fileMock.js',
|
|
|
|
'\\.svg': '<rootDir>/jest/__mocks__/svgrMock.js'
|
|
|
|
},
|
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'<rootDir>/.next',
|
|
|
|
'<rootDir>/node_modules',
|
|
|
|
'<rootDir>/build',
|
|
|
|
'<rootDir>/coverage'
|
|
|
|
],
|
2021-09-12 22:30:45 +02:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/jest/setup.ts'],
|
2019-12-08 17:27:44 +01:00
|
|
|
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/@types/**/*'],
|
2021-09-12 17:00:43 +02:00
|
|
|
collectCoverage: true,
|
|
|
|
testEnvironment: 'jsdom'
|
2019-12-08 17:27:44 +01:00
|
|
|
}
|