// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. /** @type {import('jest').Config} */ const config = { moduleDirectories: ['src', 'node_modules'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/node_modules/', '/.rollup.cache/', '/dist/'], clearMocks: true, moduleNameMapper: { '^@mattermost/(components)$': '/../platform/$1/src', '^@mattermost/(client)$': '/../platform/$1/src', '^@mattermost/(types)/(.*)$': '/../platform/$1/src/$2', '^.+\\.(css|scss)$': 'identity-obj-proxy', }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], setupFilesAfterEnv: ['/setup_jest.ts'], collectCoverageFrom: [ 'src/**/*.{js,jsx,ts,tsx}', ], coveragePathIgnorePatterns: [ '/node_modules/', '/.rollup.cache/', '/dist/', ], coverageReporters: ['json', 'lcov', 'text-summary'], }; module.exports = config;