forked from vuejs/pinia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (37 loc) · 887 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
29
30
31
32
33
34
35
36
37
module.exports = {
testEnvironment: 'jsdom',
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'text'],
collectCoverageFrom: [
'packages/pinia/src/**/*.ts',
'packages/testing/src/**/*.ts',
'!packages/testing/**/*.spec.ts',
],
coveragePathIgnorePatterns: [
'/node_modules/',
'src/index.ts',
'\\.d\\.ts$',
'src/devtools',
'src/hmr',
'src/deprecated.ts',
'src/vue2-plugin.ts',
],
testMatch: [
'<rootDir>/packages/pinia/__tests__/**/*.spec.ts',
'<rootDir>/packages/testing/**/*.spec.ts',
],
transform: {
'^.+\\.tsx?$': '@sucrase/jest-plugin',
},
moduleNameMapper: {
'^@pinia/(.*?)$': '<rootDir>/packages/$1/src',
'^pinia$': '<rootDir>/packages/pinia/src',
},
rootDir: __dirname,
globals: {
__DEV__: true,
__TEST__: true,
__BROWSER__: true,
},
}