| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | */ |
| 7 | |
| 8 | /* global module */ |
| 9 | /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ |
| 10 | module.exports = { |
| 11 | preset: 'ts-jest', |
| 12 | testEnvironment: 'jsdom', |
| 13 | collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'], |
| 14 | setupFilesAfterEnv: ['<rootDir>/__tests__/setupTests.ts'], |
| 15 | moduleNameMapper: { |
| 16 | '\\.css$': '<rootDir>/__tests__/styleMock.ts', |
| 17 | }, |
| 18 | transformIgnorePatterns: [ |
| 19 | '[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$', |
| 20 | '^.+\\.module\\.(css|sass|scss)$', |
| 21 | ], |
| 22 | testMatch: ['<rootDir>/**/__tests__/**/*.test.{js,jsx,ts,tsx}'], |
| 23 | modulePaths: ['<rootDir>'], |
| 24 | resetMocks: true, |
| 25 | }; |
| 26 | |