rickvanlieshout.com/jest/jest-config.js

23 lines
652 B
JavaScript
Raw Normal View History

2018-11-09 18:08:48 +01:00
'use strict';
module.exports = {
rootDir: '../',
transform: {
2019-05-08 23:56:56 +02:00
'^.+\\.js?$': '<rootDir>/jest/jest-preprocess.js'
2018-11-09 18:08:48 +01:00
},
testMatch: ['**/__tests__/**/*.js', '**/?(*.)test.js'],
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
2019-05-09 15:43:21 +02:00
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/jest/__mocks__/file-mock.js'
2018-11-09 18:08:48 +01:00
},
testPathIgnorePatterns: ['node_modules', '.cache', 'public'],
transformIgnorePatterns: [
'node_modules/(?!(gatsby)/)'
],
globals: {
2020-07-08 22:03:19 +02:00
__PATH_PREFIX__: '',
__BASE_PATH__: '',
2018-11-09 18:08:48 +01:00
},
2019-05-08 23:56:56 +02:00
setupFiles: ['<rootDir>/jest/loadershim.js']
2018-11-09 18:08:48 +01:00
};