forked from WordPress/openverse-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (33 loc) · 1.04 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
module.exports = {
globals: {
'vue-jest': {
experimentalCSSCompile: false,
},
},
moduleFileExtensions: ['ts', 'js', 'vue', 'json'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^~/(.*.svg)\\?inline$': '<rootDir>/src/$1',
'^~/(.*)$': '<rootDir>/src/$1',
'^~~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
'(.*svg)(\\?inline)$': '<rootDir>/test/unit/test-utils/svgTransform.js',
},
setupFiles: ['<rootDir>/test/unit/setup.js'],
setupFilesAfterEnv: ['<rootDir>/test/unit/setup-after-env.js'],
transform: {
'^.+\\.(j|t)s$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'.+\\.(css|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.svg$': '<rootDir>/test/unit/svg-transform.js',
},
testPathIgnorePatterns: ['/playwright/', '/storybook/'],
collectCoverage: true,
coverageDirectory: '<rootDir>/test/unit/coverage',
collectCoverageFrom: [
'<rootDir>/src/**/*.vue',
'<rootDir>/src/**/*.js',
'<rootDir>/src/**/*.ts',
'!<rootDir>/src/**/*.stories.js',
],
}