addons/components/jest.config.cjsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318/* global module */
b69ab319/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
b69ab3110module.exports = {
b69ab3111 preset: 'ts-jest',
b69ab3112 testEnvironment: 'jsdom',
b69ab3113 collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'],
b69ab3114 setupFilesAfterEnv: ['<rootDir>/__tests__/setupTests.ts'],
b69ab3115 moduleNameMapper: {
b69ab3116 '\\.css$': '<rootDir>/__tests__/styleMock.ts',
b69ab3117 },
b69ab3118 transformIgnorePatterns: [
b69ab3119 '[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
b69ab3120 '^.+\\.module\\.(css|sass|scss)$',
b69ab3121 ],
b69ab3122 testMatch: ['<rootDir>/**/__tests__/**/*.test.{js,jsx,ts,tsx}'],
b69ab3123 modulePaths: ['<rootDir>'],
b69ab3124 resetMocks: true,
b69ab3125};