forked from nextcloud/integration_openproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
25 lines (24 loc) · 907 Bytes
/
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
const path = require('path')
const rootDir = path.resolve(__dirname, '../../../')
module.exports = {
testMatch: ['**/tests/**/*.spec.{js,ts}'],
moduleNameMapper: {
'\\.(scss)$': '<rootDir>/tests/jest/stubs/empty.js',
'@nextcloud/l10n/gettext': require.resolve('@nextcloud/l10n/gettext'),
},
transform: {
// process *.vue files with vue-jest
'\\.vue$': '@vue/vue2-jest',
'.+\\.(css|styl|less|sass|scss|jpg|jpeg|png|svg|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|avif)$':
'jest-transform-stub',
'\\.c?js$': 'babel-jest',
},
testEnvironment: 'jest-environment-jsdom',
collectCoverage: true,
coverageProvider: 'v8',
collectCoverageFrom: ['./src/**'],
coverageDirectory: '<rootDir>/coverage/jest/',
coverageReporters: ['lcov', 'html', 'text'],
transformIgnorePatterns: ['node_modules/(?!@ckeditor)/.+\\.js$'],
setupFiles: ['<rootDir>/tests/jest/global.mock.js'],
}