// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. /** @type {import('jest').Config} */ export default { moduleDirectories: ['src', 'node_modules'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/node_modules/', '/dist/'], clearMocks: true, moduleNameMapper: { '^.+\\.css$': 'identity-obj-proxy', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], transform: { '^.+\\.(t|j)sx?$': [ '@swc/jest', { jsc: { parser: { syntax: 'typescript', tsx: true, importAssertions: true, }, transform: { react: { runtime: 'automatic', }, }, }, }, ], }, setupFilesAfterEnv: ['/setup_jest.ts'], collectCoverageFrom: [ 'src/**/*.{js,jsx,ts,tsx}', ], coveragePathIgnorePatterns: [ '/node_modules/', '/dist/', ], coverageReporters: ['json', 'lcov', 'text-summary'], };