jest.config.js 651 B

123456789101112131415161718
  1. module.exports = {
  2. transform: {
  3. '^.+\\.jsx?$': '<rootDir>/jest-preprocess.js',
  4. },
  5. moduleNameMapper: {
  6. '.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
  7. '.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
  8. '<rootDir>/__mocks__/file-mock.js',
  9. '.+\\.(svg)$': '<rootDir>/__mocks__/svgr-mock.js',
  10. },
  11. testPathIgnorePatterns: ['node_modules', '.cache', 'setupTests.js'],
  12. transformIgnorePatterns: ['node_modules/(?!(gatsby)/)'],
  13. globals: {
  14. __PATH_PREFIX__: '',
  15. },
  16. testURL: 'http://localhost',
  17. setupFiles: ['<rootDir>/loadershim.js', '<rootDir>/__tests__/setupTests.js'],
  18. };