Skip to content
Snippets Groups Projects
jest.config.js 724 B
Newer Older
Hugo NOUTS's avatar
Hugo NOUTS committed
module.exports = {
  testURL: 'http://localhost/',
  moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'styl'],
  setupFiles: ['<rootDir>/test/jestLib/setup.js'],
  moduleDirectories: ['src', 'node_modules'],
  moduleNameMapper: {
    '\\.(png|gif|jpe?g|svg)$': '<rootDir>/test/__mocks__/fileMock.js',
    // identity-obj-proxy module is installed by cozy-scripts
    '\\.(css|styl)$': 'identity-obj-proxy',
  },
  transformIgnorePatterns: [
    'node_modules/(?!(cozy-ui|cozy-harvest-lib|cozy-client))',
  ],
  transform: {
    // babel-jest module is installed by cozy-scripts
    '^.+\\.(js|jsx|ts|tsx)?$': 'babel-jest',
  },
  globals: {
    __ALLOW_HTTP__: false,
    __TARGET__: 'browser',
    cozy: {},
  },
}