-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy pathjest.config.cjs
More file actions
20 lines (20 loc) · 835 Bytes
/
jest.config.cjs
File metadata and controls
20 lines (20 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/src/test/setup.ts'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': '<rootDir>/src/test/mocks/styleMock.cjs',
'\\.(svg|png|jpg|jpeg|gif|ico|webp)$': '<rootDir>/src/test/mocks/fileMock.cjs',
'^@app/(.*)$': '<rootDir>/src/app/$1',
'monaco-editor': '<rootDir>/src/test/mocks/monaco-editor.ts',
},
transform: {
'^.+\\.(ts|tsx|js|jsx)$': ['ts-jest', { useESM: false }],
},
transformIgnorePatterns: [
'/node_modules/(?!(@patternfly|react-router)/)',
],
testMatch: ['**/__tests__/**/*.(ts|tsx|js)', '**/*.test.(ts|tsx|js)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts', '!src/test/**'],
};