mattermost-mobile-upstream/jest.config.js
yasser khan bcac248ec0
feat(e2e): Integrate TSIO reporting (#9925)
Retire legacy maestro per-platform contexts from cancel-e2e-runs and
document the canonical PR, master, and CMT status context mapping.
Wire Detox + Maestro (PR/main/CMT) into Test System IO with a single
commit status (e2e/mobile; CMT uses e2e/compatibility-matrix-testing)
and groups mobile-pr / mobile-main / cmt-mobile.

Upload shard results with correct framework labels, merge Jest shards
into TSIO Detox shape, stub missing/dead shards as failures, and post
channel summaries after status settles. Matterwick MASTER is treated as
MAIN for mobile-main routing.

Also harden report/fail paths, stage Maestro screenshots per flow for
TSIO galleries, fix a few Detox setup/testID issues, and skip known
platform flakes so the pipeline stays actionable while TSIO lands.
2026-07-23 06:43:28 +00:00

36 lines
1.4 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// eslint-disable-next-line no-process-env
process.env.TZ = 'UTC';
module.exports = {
preset: 'jest-expo',
verbose: true,
globals: {
'ts-jest': {
tsConfigFile: 'tsconfig.test.json',
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
clearMocks: true,
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
collectCoverageFrom: ['app/**/*.{js,jsx,ts,tsx}'],
coverageReporters: ['lcov', 'text-summary', 'json-summary'],
testPathIgnorePatterns: ['/node_modules/', '/detox/'],
coveragePathIgnorePatterns: ['/node_modules/', '/components/', '/screens/', '/routes/'],
transformIgnorePatterns: [
'node_modules/(?!' +
'(@react-native|react-native)|' +
'expo(?:-[^/]+)?|@expo|expo-modules-core|uuid|' +
'@sentry/react-native|' +
'react-intl|@formatjs/[^/]+|intl-messageformat|@messageformat/[^/]+|' +
'validator|' +
'hast-util-from-selector|hastscript|property-information|hast-util-parse-selector|space-separated-tokens|comma-separated-tokens|zwitch|' +
'@mattermost/calls|@mattermost/rnutils|@mattermost/hardware-keyboard|@mattermost/rnshare|@mattermost/secure-pdf-viewer|@mattermost/compass-icons|' +
'@rneui/base|' +
'@shopify/flash-list|' +
'ratex-react-native)',
],
};