forked from formvuelate/formvuelate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
45 lines (34 loc) · 898 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
38
39
40
41
42
43
44
45
module.exports = {
rootDir: __dirname,
preset: 'ts-jest',
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.vue$': 'vue3-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
transformIgnorePatterns: [
'/node_modules/'
],
moduleNameMapper: {
'^@formvuelate/(.+)$': '<rootDir>/packages/$1/src',
'^(formvuelate)$': '<rootDir>/packages/formvuelate/src'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: ['<rootDir>/packages/**/tests/**/*spec.[jt]s?(x)'],
collectCoverageFrom: [
'<rootDir>/packages/**/src/*.{js,jsx,vue}',
'!<rootDir>/packages/**/*.e2e.js',
'!<rootDir>/packages/src/index.js'
],
setupFilesAfterEnv: ['./jest.setup.js'],
testURL: 'http://localhost/'
}