-
Notifications
You must be signed in to change notification settings - Fork 4
/
jest.config.js
49 lines (49 loc) · 1.53 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
module.exports = {
moduleNameMapper: {
// backbone needs this defined here because of the way it checks for jquery & underscore
underscore: '<rootDir>/modules/external/underscore.js',
'ext.pageTriage.tagData$': '<rootDir>/modules/ext.pageTriage.tagData/main.js',
'ext.pageTriage.util': '<rootDir>/modules/ext.pageTriage.util/main.js',
// @TODO: map virtual files with full path
'./icons.json': '<rootDir>/tests/mocks/icons.json',
'./config.json': '<rootDir>/tests/mocks/config.json',
'./contentLanguageMessages.json': '<rootDir>/tests/mocks/contentLanguageMessages.json',
'../../../external/jquery.badge.js': '<rootDir>/modules/external/jquery.badge.js',
// backbone needs this defined here because of the way it checks for jquery & underscore
'^./modules/(.+)/ext.pageTriage.(.+).underscore': '<rootDir>/modules/$1/$2.underscore'
},
clearMocks: true,
collectCoverageFrom: [
'modules/**/*.(js|vue)'
],
coveragePathIgnorePatterns: [
'/modules/external/',
'/node_modules/'
],
coverageThreshold: {
global: {
branches: 4,
functions: 6,
lines: 6,
statements: 6
}
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\js$': 'babel-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(js|ts)$',
moduleFileExtensions: [ 'js', 'vue' ],
coverageReporters: [ 'text', 'json-summary', 'lcov', 'clover' ],
testEnvironmentOptions: {
url: 'http://localhost:8080',
customExportConditions: [
'node',
'node-addons'
]
},
setupFilesAfterEnv: [
'<rootDir>/jest.setup.js'
]
};