-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathjest.config.ts
50 lines (46 loc) · 1.54 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
import type {Config} from 'jest';
import baseConfig from '../../../config/tests/jest.config';
const esModules = ['@web3-storage'].join('|');
const config: Config = {
...baseConfig,
projects: [
{
displayName: 'shopify-app-remix-react',
preset: 'ts-jest',
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['src/server'],
transform: {
'^.+\\.(js|jsx)$': ['babel-jest', {configFile: './babel.config.js'}],
},
transformIgnorePatterns: [`node_modules/.pnpm/(?!${esModules})`],
},
{
displayName: 'shopify-app-remix-server-node',
preset: 'ts-jest',
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
setupFilesAfterEnv: [
...(baseConfig.setupFilesAfterEnv ?? []),
`${__dirname}/src/server/adapters/node/__tests__/setup-jest.ts`,
],
testPathIgnorePatterns: ['src/react', 'src/server/adapters/__tests__'],
},
{
displayName: 'shopify-app-remix-server-vercel',
preset: 'ts-jest',
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
setupFilesAfterEnv: [
...(baseConfig.setupFilesAfterEnv ?? []),
`${__dirname}/src/server/adapters/vercel/__tests__/setup-jest.ts`,
],
testPathIgnorePatterns: ['src/react', 'src/server/adapters/__tests__'],
},
{
displayName: 'shopify-app-remix-server-adapters',
preset: 'ts-jest',
rootDir: './src/server/adapters',
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
},
],
};
export default config;