EvalueTonSavoir/client/jest.config.cjs

20 lines
693 B
JavaScript
Raw Normal View History

/* eslint-disable no-undef */
2024-03-29 20:08:34 -04:00
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: 'tsconfig.json' }],
2024-03-29 20:08:34 -04:00
'^.+\\.(js|jsx)$': 'babel-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testEnvironment: 'jsdom',
//moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFiles: ['./jest.setup.cjs'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^src/constants$': '<rootDir>/src/__mocks__/constantsMock.tsx',
2024-03-29 20:08:34 -04:00
},
transformIgnorePatterns: ['node_modules/(?!nanoid/)'],
2024-03-29 20:08:34 -04:00
};