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: '..', collectCoverage: true, setupFilesAfterEnv: ['/jest/setup-env.ts'], setupFiles: ['/jest/setup.ts'], transformIgnorePatterns: ['/node_modules/(?!react-syntax-highlighter)'], snapshotSerializers: ['@emotion/jest/serializer'], collectCoverageFrom: [ 'src/**/*.{ts,tsx}', '!**/node_modules/**', '!src/**/*.stories.{ts,tsx}', '!src/types/**', ], 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', 'react-markdown': '/src/__mocks__/react-markdown.tsx', 'remark-*': '/src/__mocks__/remark-plugin.ts', }, coverageReporters: ['text', 'html'], coverageThreshold: { global: { branches: 70, functions: 76, lines: 80, statements: 82, }, }, });