mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-20 09:35:11 +08:00
36 lines
991 B
TypeScript
36 lines
991 B
TypeScript
import type { Config } from '@jest/types';
|
|
|
|
const config: Config.InitialOptions = {
|
|
clearMocks: true,
|
|
coverageDirectory: 'coverage',
|
|
coverageReporters: ['text', 'cobertura', 'html', 'json-summary'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
|
modulePathIgnorePatterns: ['dist'],
|
|
moduleNameMapper: {
|
|
'\\.(css|less)$': '<rootDir>/__mocks__/cssMock.ts',
|
|
},
|
|
globals: {
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
'ts-jest': {
|
|
useESM: true,
|
|
},
|
|
},
|
|
testMatch: ['<rootDir>/src/**/?(*.)(test).(ts|js)?(x)'],
|
|
preset: 'ts-jest/presets/js-with-ts-esm',
|
|
transform: {
|
|
'^.+\\.(ts|tsx)?$': 'ts-jest',
|
|
'^.+\\.(js|jsx)$': 'babel-jest',
|
|
},
|
|
transformIgnorePatterns: ['node_modules/(?!(lodash-es)/)'],
|
|
setupFilesAfterEnv: ['<rootDir>jest.setup.ts'],
|
|
testPathIgnorePatterns: ['/node_modules/', '/public/'],
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
testEnvironmentOptions: {
|
|
'jest-playwright': {
|
|
browsers: ['chromium', 'firefox', 'webkit'],
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|