-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
29 lines (29 loc) · 917 Bytes
/
Copy pathjest.config.cjs
File metadata and controls
29 lines (29 loc) · 917 Bytes
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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(css|less|sass|scss|styl)$': 'identity-obj-proxy',
'^justorm/react$': '<rootDir>/node_modules/justorm/react.js',
'^nanoid$': '<rootDir>/node_modules/nanoid/index.cjs',
'^uilib(.*)$': '<rootDir>/src$1',
'\\.svg$': '<rootDir>/tests/mocks/svgMock.js',
},
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
setupFilesAfterEnv: [
'@testing-library/jest-dom',
'<rootDir>/tests/setup.tsx',
],
moduleDirectories: ['node_modules', 'src'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/bin/test.ts'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};