-
Notifications
You must be signed in to change notification settings - Fork 88
/
jest.config.js
82 lines (75 loc) · 1.61 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
76
77
78
79
80
81
82
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const ignorePatterns = [
'ansi-regex',
'bail',
'ccount', // ESM dependency of remark-gfm
'char-regex',
'comma-separated-tokens',
'decode-named-character-reference',
'devlop', // ESM dependency of unified
'escape-string-regexp',
'hast-*',
'is-*',
'longest-streak', // ESM dependency of remark-gfm
'markdown-table', // ESM dependency of remark-gfm
'mdast-util-*',
'micromark',
'property-information',
'rehype-*',
'remark-*',
'space-separated-tokens',
'string-length',
'strip-ansi',
'tributejs',
'trim-lines',
'trough',
'unified',
'unist*',
'vfile',
'vue-material-design-icons',
'web-namespaces',
'zwitch', // ESM dependency of remark-gfm
]
module.exports = {
moduleFileExtensions: [
'js',
'ts',
'vue',
],
testEnvironment: 'jsdom',
setupFilesAfterEnv: [
'./tests/setup.js',
],
transform: {
'^.+\\.(j|t)s$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest',
'.+\\?raw$': 'jest-raw-loader',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
'/node_modules/(?!(' + ignorePatterns.join('|') + '))',
],
moduleNameMapper: {
'\\.(css|scss)$': 'jest-transform-stub',
'\\?raw$': 'jest-raw-loader',
},
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue',
],
coverageDirectory: './coverage/',
collectCoverage: false,
collectCoverageFrom: [
'<rootDir>/src/**/*.{js,ts,vue}',
'!**/node_modules/**',
],
coverageReporters: [
'json',
'text',
'html',
'lcov',
'clover',
],
}