const config = require('../../../jest/config'); module.exports = Object.assign({}, config, { testEnvironment: 'jest-environment-jsdom-global', transform: { '^.+\\.(js|ts|tsx)$': 'babel-jest', }, moduleFileExtensions: ['js', 'ts', 'tsx'], testEnvironmentOptions: { url: '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)'], snapshotSerializers: ['@emotion/jest/serializer'], collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**'], modulePathIgnorePatterns: ['/build/'], 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', 'github-markdown-css': '/jest/identity.js', 'react-markdown': '/src/__mocks__/react-markdown.tsx', 'remark-*': '/src/__mocks__/remark-plugin.ts', }, coverageReporters: [['text', { skipFull: true }]], coverageThreshold: { global: { branches: 68, functions: 65, lines: 73, statements: 73, }, }, });