const config = require('../../../../jest/config'); module.exports = Object.assign({}, config, { automock: false, collectCoverage: false, testEnvironment: 'jest-environment-jsdom-global', transform: { '^.+\\.(js|ts|tsx)$': 'babel-jest', }, moduleFileExtensions: ['js', 'ts', 'tsx'], testEnvironmentOptions: { url: 'http://localhost:9000/', }, rootDir: '..', setupFilesAfterEnv: ['/jest/setup-env.ts'], setupFiles: ['/jest/setup.ts'], transformIgnorePatterns: ['/node_modules/(?!react-syntax-highlighter)'], modulePathIgnorePatterns: [ '/coverage', '/scripts', '/.circleci', '/tools', '/build', '/.vscode/', '/test/e2e/', ], snapshotSerializers: ['@emotion/jest/serializer'], moduleNameMapper: { '\\.(s?css)$': '/jest/identity.js', '\\.(png)$': '/jest/identity.js', '\\.(svg)$': '/jest/unit/empty.ts', '\\.(jpg)$': '/jest/unit/empty.ts', '\\.(md)$': '/jest/unit/empty-string.ts', // note: this section has to be on sync with webpack configuration 'verdaccio-ui/components/(.*)': '/src/components/$1', 'verdaccio-ui/utils/(.*)': '/src/utils/$1', 'react-markdown': '/src/__mocks__/react-markdown.tsx', 'remark-*': '/src/__mocks__/remark-plugin.ts', }, });