forked from Shopify/hydrogen-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
37 lines (35 loc) · 1022 Bytes
/
jest.config.ts
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
// eslint-disable-next-line node/no-extraneous-import
import type {Config} from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
testMatch: [
'**/*.(spec|test).[jt]s?(x)',
'!**/*/dist/**/*',
'!**/*/fixtures/**/*',
],
testPathIgnorePatterns: ['<rootDir>/packages/playground/*'],
testTimeout: process.env.CI ? 30000 : 10000,
watchPathIgnorePatterns: ['<rootDir>/temp', 'fixtures'],
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
globals: {
__DEV__: true,
'ts-jest': {
tsconfig: {
jsx: 'react',
esModuleInterop: true,
lib: ['ESNext', 'DOM'],
target: 'es6',
},
},
},
collectCoverageFrom: [
'packages/hydrogen/**/*.{ts,tsx}',
'!packages/hydrogen/**/*.d.{ts,tsx}',
'!packages/hydrogen/src/graphql/**/*',
'!packages/hydrogen/node_modules/**/*',
'!packages/hydrogen/dist/**/*',
],
coverageDirectory: 'coverage',
coverageReporters: ['html-spa', 'text-summary'],
};
export default config;