forked from vue-styleguidist/vue-styleguidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
28 lines (28 loc) · 957 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
module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.js$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'js', 'json', 'tsx'],
testMatch: [
'<rootDir>/packages/*/tests/**/*.test.(ts|js|tsx)',
'<rootDir>/packages/**/__tests__/*.(ts|js|tsx)'
],
transformIgnorePatterns: ['/node_modules/(?!react-styleguidist/lib/client).+\\.js$'],
setupFiles: ['./test/raf-polyfill.js', './test/jestsetup.js'],
modulePaths: [
'./packages/vue-styleguidist/src/client',
'./node_modules/react-styleguidist/lib/client'
],
moduleNameMapper: {
'^.+\\.css$': '<rootDir>/test/empty.js'
},
collectCoverageFrom: [
'packages/*/src/**/*{!.d,}.{js,ts,tsx}',
'!**/*.d.ts',
'!packages/docgen-tests/**/*.*',
'!packages/vue-cli-plugin-styleguidist/**/*.*'
],
testPathIgnorePatterns: ['<rootDir>/packages/*/lib/', '<rootDir>/packages/*/dist/'],
snapshotSerializers: ['deabsdeep/serializer', 'enzyme-to-json/serializer', 'jest-serializer-html']
}