forked from WordPress/openverse-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (25 loc) · 842 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
module.exports = {
moduleFileExtensions: ['js', 'vue', 'json'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^~/(.*)$': '<rootDir>/src/$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: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.svg$': '<rootDir>/test/unit/svg-transform.js',
},
testPathIgnorePatterns: ['/e2e/'],
collectCoverage: true,
coverageDirectory: '<rootDir>/test/unit/coverage',
collectCoverageFrom: [
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue',
],
}