2019-11-16 21:51:46 +03:00
|
|
|
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: [
|
2019-11-28 10:41:47 +03:00
|
|
|
'<rootDir>/bin/**/*.js',
|
2019-12-10 23:44:49 +03:00
|
|
|
'<rootDir>/helpers/**/*.js',
|
|
|
|
'<rootDir>/api/**/*.js'
|
2019-11-16 21:51:46 +03:00
|
|
|
],
|
|
|
|
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'
|
|
|
|
],
|
2020-03-07 19:40:24 +03:00
|
|
|
moduleFileExtensions: ['ts', 'js', 'json'],
|
2019-11-16 21:51:46 +03:00
|
|
|
moduleNameMapper: {
|
|
|
|
'^~/(.*)$': '<rootDir>/$1',
|
2021-01-30 18:15:47 +03:00
|
|
|
'^dist/(.*)$': '<rootDir>/dist/$1',
|
2019-11-28 10:41:47 +03:00
|
|
|
'^bin/(.*)$': '<rootDir>/bin/$1',
|
2020-03-07 19:40:24 +03:00
|
|
|
'^helpers/(.*)$': '<rootDir>/src/helpers/$1',
|
|
|
|
'^api/(.*)$': '<rootDir>/src/api/$1',
|
|
|
|
'^templates/(.*)$': '<rootDir>/src/templates/$1',
|
2019-11-28 10:41:47 +03:00
|
|
|
'^test/(.*)$': '<rootDir>/test/$1',
|
|
|
|
'../../package.json': '<rootDir>/package.json'
|
2019-11-16 21:51:46 +03:00
|
|
|
},
|
2020-08-19 05:36:46 +03:00
|
|
|
transform: {
|
2021-01-30 18:15:47 +03:00
|
|
|
'templates[\\\\/]tauri.js': './test/jest/raw-loader-transformer.js',
|
2021-03-23 03:05:37 +03:00
|
|
|
'\\.toml$': 'jest-transform-toml',
|
2020-08-19 05:36:46 +03:00
|
|
|
'\\.(js|ts)$': 'babel-jest'
|
2020-03-07 19:40:24 +03:00
|
|
|
}
|
2019-11-16 21:51:46 +03:00
|
|
|
}
|