-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
40 lines (40 loc) · 1.25 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
module.exports = {
collectCoverage: true,
collectCoverageFrom: [
'packages/arm-core/src/**/*.{js,jsx,ts,tsx}',
'!packages/**/src/(styles|internals)/**/*.{js,jsx,ts,tsx}',
'!packages/**/*.(test|stories).{js,jsx,ts,tsx}',
'!packages/**/(index).{js,jsx,ts,tsx}',
],
coverageDirectory: '<rootDir>/coverage',
coverageReporters: ['lcov'],
coverageThreshold: {
global: {
statements: 0,
branches: 0,
functions: 0,
lines: 0,
},
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleDirectories: ['node_modules'],
moduleNameMapper: {
'^.+\\.svg$': '<rootDir>/test/__mocks__/svgMock.ts',
'^.+\\.css': '<rootDir>/test/__mocks__/cssMock.ts',
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|sv|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/test/__mocks__/imageMock.ts',
'arm-core/es/(.*)': '<rootDir>/packages/arm-core/lib/$1',
},
setupFilesAfterEnv: ['<rootDir>/config/testing/test-bundler.ts'],
testPathIgnorePatterns: ['/node_modules/', '/es/', '/lib/', '/stories/'],
testEnvironment: 'jsdom',
transform: {
'\\.(ts|tsx)$': 'ts-jest',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
testRegex: ['/__tests__/.*\\.(ts|tsx|js)$', '/*.test\\.(ts|tsx|js)$'],
}