/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ module.exports = { transform: { '^.*__tests__(/|\\\\).*\\.tsx?$': 'ts-jest', '\\.(js|tsx?)$': '/scripts/jest-transform.js', }, setupFiles: ['/scripts/jest-setup.tsx'], setupFilesAfterEnv: ['/scripts/jest-setup-after.tsx'], moduleNameMapper: { '^flipper$': '/app/src', '^flipper-plugin$': '/flipper-plugin/src', '^flipper-(server-core|ui-core|frontend-core|common)$': '/flipper-$1/src', '^flipper-(pkg|pkg-lib|doctor|test-utils)$': '/$1/src', '^.+\\.(css|scss)$': '/scripts/jest-css-stub.js', }, clearMocks: true, coverageReporters: [ 'json-summary', 'lcov', 'html', ...(process.env.COVERAGE_TEXT === 'detailed' ? ['text'] : []), ], testMatch: ['**/**.(node|spec).(js|jsx|ts|tsx)'], testEnvironment: 'jsdom', resolver: '/jest.resolver.js', };