This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
forked from kaoto-archive/kaoto-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
50 lines (40 loc) · 1.93 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const path = require('path');
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
transform: {
'\\.(ts|tsx)$': 'ts-jest',
},
moduleNameMapper: {
'\\.(css|less)$': path.resolve(__dirname, './src/__mocks__/styleMock.js'),
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
path.resolve(__dirname, './src/__mocks__/fileMock.js'),
'@patternfly/react-code-editor': path.resolve(
__dirname,
'./src/__mocks__/reactCodeEditorMock.js'
),
'@kaoto/api': path.resolve(__dirname, './src/api'),
'@kaoto/assets': path.resolve(__dirname, './src/assets'),
'@kaoto/components': path.resolve(__dirname, './src/components'),
'@kaoto/constants': path.resolve(__dirname, './src/store/constants'),
'@kaoto/hooks': path.resolve(__dirname, './src/hooks'),
'@kaoto/layout': path.resolve(__dirname, './src/layout'),
'@kaoto/types': path.resolve(__dirname, './src/types'),
'@kaoto/routes': path.resolve(__dirname, './src/routes'),
'@kaoto/services': path.resolve(__dirname, './src/services'),
'@kaoto/store': path.resolve(__dirname, './src/store'),
'@kaoto/utils': path.resolve(__dirname, './src/utils'),
'@kie-tools/uniforms-patternfly/dist/esm': path.resolve(__dirname, 'node_modules/@kie-tools/uniforms-patternfly/dist/cjs'),
},
roots: ['<rootDir>'],
// A preset that is used as a base for Jest's configuration
preset: 'ts-jest',
// The path to a module that runs some code to configure or set up the testing framework before each test
setupFilesAfterEnv: [path.resolve(__dirname, './setupTests.ts')],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
testEnvironment: 'jsdom',
};