forked from HumanSignal/label-studio-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
65 lines (65 loc) · 1.56 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
54
55
56
57
58
59
60
61
62
63
64
65
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
'bail': true,
'roots': [
'<rootDir>/src',
],
'preset': 'ts-jest',
'testEnvironment': 'jsdom',
'verbose': false,
'coverageDirectory': 'coverage',
'coverageReporters': ['json', 'lcov', 'clover'],
'coverageThreshold': {
'global': {
'branches': 1,
'functions': 1,
'lines': 1,
'statements': 1,
},
},
'transform': {
'^.+\\.[tj]sx?$': ['babel-jest', {
'presets': [
['@babel/preset-react', {
'runtime': 'automatic',
}],
'@babel/preset-typescript',
['@babel/preset-env', {
'targets': {
'browsers': ['last 2 Chrome versions'],
'node': 'current',
},
}],
],
'plugins': [
['babel-plugin-import', { 'libraryName': 'antd' }],
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
],
}],
},
'moduleFileExtensions': [
'js',
'ts',
'jsx',
'tsx',
],
'moduleDirectories': [
'node_modules',
],
'moduleNameMapper': {
'^konva': 'konva/konva',
'^keymaster': 'identity-obj-proxy',
'^react-konva-utils': 'identity-obj-proxy',
'\\.(s[ac]ss|css|styl|svg|png|jpe?g)$': 'identity-obj-proxy',
},
'testPathIgnorePatterns': [
'/node_modules/',
'/e2e/',
],
'transformIgnorePatterns': [
'node_modules/?!(nanoid|konva)',
],
};