-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
38 lines (38 loc) · 1.1 KB
/
jest.config.ts
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
export default {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
'@nuxtjs/composition-api/module': '@nuxtjs/composition-api/module/lib/entrypoint.js',
"^.+.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
},
moduleFileExtensions: [
'ts',
'js',
'vue',
'json',
'tsx',
'svg'
],
preset: 'ts-jest',
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
"^.+\\.(js|jsx)$": "babel-jest",
'.*\\.(vue)$': 'vue-jest',
".+\\.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$": "jest-transform-stub"
},
transformIgnorePatterns: [
"node_modules/(?!typed-vuex)"
],
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/nci/app/components/**/*.{js,vue,ts}',
'<rootDir>/nci/storybook/**/*.{js,vue,ts}',
'<rootDir>/nci/app/factories/**/*.{js,vue,ts}',
'<rootDir>/pages/**/*.{js,vue,ts}',
'<rootDir>/store/**/*.{js,vue,ts}',
"!**/node_modules/**"
],
testEnvironment: "jsdom",
setupFilesAfterEnv: ['./nci/app/testing/registerComponents.ts']
}