mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00

* chore: setup jest tests * refactor: add explicit command for running with coverage * chore(jest): update js files to ts files * chore: update jest setup paths
24 lines
702 B
TypeScript
24 lines
702 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',
|
|
},
|
|
notify: true,
|
|
notifyMode: 'always',
|
|
testMatch: ['<rootDir>/src/**/?(*.)(test).(ts|js)?(x)'],
|
|
transform: {
|
|
'\\.(js|jsx|ts|tsx)?$': 'babel-jest',
|
|
},
|
|
setupFilesAfterEnv: ['<rootDir>jest.setup.ts'],
|
|
testPathIgnorePatterns: ['/node_modules/', '/public/'],
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
};
|
|
|
|
export default config;
|