forked from R0Wi-DEV/workflow_ocr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
75 lines (65 loc) · 1.2 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
66
67
68
69
70
71
72
73
74
75
// These modules will be transformed to commonjs modules
const ignorePatterns = [
'ansi-regex',
'@mdi/svg',
'bail',
'comma-separated-tokens',
'char-regex',
'decode-named-character-reference',
'devlop',
'escape-string-regexp',
'hast-.*',
'is-.*',
'mdast-.*',
'micromark',
'micromark-.*',
'property-information',
'rehype-.*',
'remark-.*',
'space-separated-tokens',
'string-length',
'strip-ansi',
'trim-lines',
'trough',
'tributejs',
'unified',
'unist-.*',
'vfile',
'vfile-.*',
'vue-material-design-icons',
'web-namespaces',
]
module.exports = {
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,vue}',
'!src/test/**',
'!**/node_modules/**',
],
coverageReporters: [
'text-summary',
'json',
'lcov',
'html',
],
testMatch: [
'**/src/test/*.spec.js',
'**/src/test/**/*.spec.js'
],
transformIgnorePatterns: [
'node_modules/(?!(' + ignorePatterns.join('|') + ')/)',
],
setupFilesAfterEnv: ['<rootDir>/src/test/setup-jest.js'],
testEnvironment: 'jest-environment-jsdom',
moduleFileExtensions: [
'js',
'vue',
],
moduleNameMapper: {
'\\.(css|scss)$': 'jest-transform-stub',
},
transform: {
'\\.js$': 'babel-jest',
'\\.vue$': '@vue/vue2-jest',
},
}