This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
jest.config.js
62 lines (46 loc) · 1.51 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* eslint-disable unicorn/prefer-module */
module.exports = {
globals: { __DEV__: true },
coverageReporters: ['lcov'],
coverageThreshold: { global: {} },
coveragePathIgnorePatterns: ['/node_modules/', '.d.ts$', '/__mocks__/'],
coverageDirectory: './coverage/',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts)$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
'^.+\\.(css|svg)': 'jest-transform-stub',
},
collectCoverageFrom: [
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue',
'<rootDir>/middleware/**/*.js',
'<rootDir>/plugins/**/*.js',
],
setupFiles: [
'jest-date-mock',
'jest-localstorage-mock',
],
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
transformIgnorePatterns: [
'node_modules/(?!(@storefront-ui)|vee-validate/dist/rules|nouislider|lodash-es)',
],
testMatch: ['<rootDir>/**/__tests__/**/*spec.[jt]s?(x)'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
['jest-watch-toggle-config', { setting: 'verbose' }],
['jest-watch-toggle-config', { setting: 'collectCoverage' }],
['jest-watch-toggle-config', { setting: 'notify' }],
['jest-watch-toggle-config', { setting: 'bail' }],
],
collectCoverage: false,
moduleFileExtensions: ['js', 'vue', 'json', 'ts'],
modulePathIgnorePatterns: ['_theme', 'tests/e2e'],
};