signoz/frontend/jest.config.ts
Bhavin Ag 56fcc0c4a7
chore(jest): setup jest for frontend (#331)
* 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
2021-10-11 16:31:38 +05:30

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;