Skip to content
Snippets Groups Projects
jest.config.js 733 B
Newer Older
  • Learn to ignore specific revisions
  • 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|sass|scss)$': 'identity-obj-proxy',
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
      },
      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',
    
    Yoan VALLET's avatar
    Yoan VALLET committed
        cozy: {},
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    }