forked from quasarframework/quasar-ui-qcalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
48 lines (48 loc) · 1.39 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
module.exports = {
globals: {
__DEV__: true
},
setupFilesAfterEnv: ['<rootDir>/test/jest/jest.setup.js'],
// noStackTrace: true,
// bail: true,
// cache: false,
// verbose: true,
// watch: true,
collectCoverage: true,
coverageDirectory: '<rootDir>/test/jest/coverage',
collectCoverageFrom: [
'<rootDir>/src/utils/Timestamp.js'
// add other paths here if you want them
],
// collectCoverageFrom: [
// '<rootDir>/src/**/*.js'
// // add other paths here if you want them
// ],
coverageReporters: ['json-summary', 'text', 'lcov'],
coverageThreshold: {
global: {
// branches: 50,
// functions: 50,
// lines: 50,
// statements: 50
}
},
testMatch: [
'<rootDir>/test/jest/__tests__/**/*.spec.js',
'<rootDir>/test/jest/__tests__/**/*.test.js'
],
moduleFileExtensions: ['js', 'json'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1',
'^vue$': '<rootDir>/../demo/node_modules/vue/dist/vue.common.js', // this is uncool
'^quasar$': '<rootDir>/../demo/node_modules/quasar/dist/quasar.common.js', // this is uncool
'^utils/(.*)$': '<rootDir>/src/utils/$1',
'^test/(.*)$': '<rootDir>/test/$1',
'package.json': '<rootDir>/package.json'
},
transform: {
'.*\\.js$': 'babel-jest',
'.*\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
}
}