-
Notifications
You must be signed in to change notification settings - Fork 13
/
jest.config.js
53 lines (53 loc) · 1.48 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
51
52
53
module.exports = {
testEnvironment: 'jsdom',
collectCoverage: false,
collectCoverageFrom: [
'packages/asc-ui/src/**/*.{js,jsx,ts,tsx}',
'!packages/asc-ui/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', 'jsx'],
moduleDirectories: ['node_modules', 'packages'],
moduleNameMapper: {
'^.+\\.svg$': '<rootDir>/config/testing/mocks/svg.ts',
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|sv|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/config/testing/mocks/image.ts',
'^@amsterdam/asc-ui': '<rootDir>/packages/asc-ui/src',
'^@amsterdam/asc-assets': '<rootDir>/packages/asc-assets/src',
},
testPathIgnorePatterns: [
'/node_modules/',
'/lib/',
'/es/',
'/examples/',
'/config/',
'/package/',
'/scripts/',
'/packages/asc-assets/',
'/packages/asc-ui/src/internals',
],
setupFilesAfterEnv: [
'<rootDir>/config/testing/mocks/matchMedia.ts',
'<rootDir>/config/testing/test-bundler.ts',
],
transform: {
'\\.(ts|tsx)$': 'ts-jest',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
testRegex: ['/__tests__/.*\\.(ts|tsx|js)$', '/*.test\\.(ts|tsx|js)$'],
}