forked from web-infra-dev/garfish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
29 lines (28 loc) · 910 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
clearMocks: true,
testTimeout: 20000,
testEnvironment: 'jsdom',
preset: 'jest-puppeteer',
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['__tests__', '/node_modules/'],
coverageProvider: 'v8',
globals: {
__DEV__: true,
__TEST__: true,
__VERSION__: '"unknow"',
},
preset: 'ts-jest',
transformIgnorePatterns: [
// Change MODULE_NAME_HERE to your module that isn't being compiled
'/node_modules/(?!(@garfish)).+\\.js$',
],
transform: { '\\.js$': ['babel-jest'], '\\.ts$': 'ts-jest' },
rootDir: __dirname,
testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dev/'],
moduleNameMapper: {
'@garfish/(.*)': '<rootDir>packages/$1/src',
},
};