-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (28 loc) · 879 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
26
27
28
// ./jest.config.js
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleFileExtensions: ['js', 'jsx', 'mjs', 'ts', 'vue'],
moduleNameMapper: {
'^@/(.*)': '<rootDir>/$1',
'^~~/(.*)': '<rootDir>/$1',
'#app': '<rootDir>/node_modules/nuxt3/dist/app/index.mjs',
},
transform: {
'^.+\\.(js|jsx|mjs)$': 'babel-jest',
'^.+\\.(ts|tsx)$': 'ts-jest',
'.+\\.(css|scss|png|jpg|svg)$': 'jest-transform-stub',
'.*\\.(vue)$': '@vue/vue3-jest',
},
transformIgnorePatterns: ['node_modules/(?!(nuxt3|unenv))'],
coverageReporters: ['lcov', 'text-summary'],
coverageThreshold: {
global: {
branches: 52,
functions: 58,
lines: 68,
statements: 68,
},
},
}