forked from channel-io/bezier-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
38 lines (38 loc) · 1.16 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
module.exports = {
roots: ['./src'],
setupFilesAfterEnv: ['./jest.setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js'],
transformIgnorePatterns: [],
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
},
testMatch: ['**/*.test.(ts|tsx)'],
moduleDirectories: [
'node_modules',
'src',
],
moduleNameMapper: {
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'identity-obj-proxy',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'Components/(.*)$': '<rootDir>/src/components/$1',
'Constants/(.*)$': '<rootDir>/src/constants/$1',
'^Foundation$': '<rootDir>/src/foundation',
'Foundation/(.*)$': '<rootDir>/src/foundation/$1',
'Hooks/(.*)$': '<rootDir>/src/hooks/$1',
'Layout/(.*)$': '<rootDir>/src/layout/$1',
'Types/(.*)$': '<rootDir>/src/types/$1',
'Utils/(.*)$': '<rootDir>/src/utils/$1',
'Worklets/(.*)$': '<rootDir>/src/worklets/$1',
},
collectCoverage: true,
coveragePathIgnorePatterns: [
'src/components/Icon/generated/',
'src/worklets/',
'src/index.ts',
],
collectCoverageFrom: [
'**/*.{ts,tsx,js,jsx}',
'!**/*.stories.tsx',
],
}