mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
* add shard and log heap usage in jest * separate each type of tests * fix code coverage and indicate heap usage to all tests * exercise each 10 times, change channels shard to 4 * revert to single run, fix npm cache and merge/report code coverage with nyc
30 lines
1,011 B
JavaScript
30 lines
1,011 B
JavaScript
// 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)$': '<rootDir>/../platform/$1/src',
|
|
'^@mattermost/(client)$': '<rootDir>/../platform/$1/src',
|
|
'^@mattermost/(types)/(.*)$': '<rootDir>/../platform/$1/src/$2',
|
|
'^.+\\.(css|scss)$': 'identity-obj-proxy',
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
setupFilesAfterEnv: ['<rootDir>/setup_jest.ts'],
|
|
collectCoverageFrom: [
|
|
'src/**/*.{js,jsx,ts,tsx}',
|
|
],
|
|
coveragePathIgnorePatterns: [
|
|
'/node_modules/',
|
|
'/.rollup.cache/',
|
|
'/dist/',
|
|
],
|
|
coverageReporters: ['json', 'lcov', 'text-summary'],
|
|
};
|
|
|
|
module.exports = config;
|