const config = require('../../../../jest/config'); module.exports = Object.assign({}, config, { name: 'verdaccio-ui-jest', verbose: true, automock: false, collectCoverage: true, testEnvironment: 'jest-environment-jsdom-global', transform: { '^.+\\.(js|ts|tsx)$': 'babel-jest', }, moduleFileExtensions: ['js', 'ts', 'tsx'], testURL: 'http://localhost:9000/', rootDir: '..', setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', '/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', 'github-markdown-css': '/jest/identity.js', // note: this section has to be on sync with webpack configuration 'verdaccio-ui/components/(.*)': '/src/components/$1', 'verdaccio-ui/utils/(.*)': '/src/utils/$1', 'verdaccio-ui/providers/(.*)': '/src/providers/$1', 'verdaccio-ui/design-tokens/(.*)': '/src/design-tokens/$1', }, });