MM-52213 webapp/platform/components : Add unit test framework (#23366)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c894cd3f30
Коммит
5808b848c3
21
webapp/platform/components/jest.config.js
Обычный файл
21
webapp/platform/components/jest.config.js
Обычный файл
@@ -0,0 +1,21 @@
|
||||
// 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>/src/setupTests.ts'],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
Ссылка в новой задаче
Block a user