-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
55 lines (55 loc) · 1.74 KB
/
jest.config.js
File metadata and controls
55 lines (55 loc) · 1.74 KB
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
51
52
53
54
55
module.exports = {
displayName: 'digitaldefiance-express-suite-react-components',
preset: 'ts-jest',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
resources: 'usable',
runScripts: 'dangerously',
// Enable React 19 support in jsdom
customExportConditions: [''],
},
maxWorkers: 4,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory:
'../../coverage/packages/digitaldefiance-express-suite-react-components',
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
jsx: 'react-jsx',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
},
},
],
'^.+\\.jsx?$': [
'ts-jest',
{
tsconfig: {
jsx: 'react-jsx',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
},
},
],
},
moduleNameMapper: {
'^@digitaldefiance/ecies-lib$':
'<rootDir>/../digitaldefiance-ecies-lib/src/index.ts',
'^@digitaldefiance/i18n-lib$':
'<rootDir>/../digitaldefiance-i18n-lib/src/index.ts',
'^@digitaldefiance/suite-core-lib$':
'<rootDir>/../digitaldefiance-suite-core-lib/src/index.ts',
'^bson$':
'<rootDir>/../digitaldefiance-express-suite-test-utils/src/lib/bson-mock.ts',
'^mongoose$': '<rootDir>/../digitaldefiance-express-suite-test-utils/src/lib/bson-mock.ts',
// Ensure single instance of React
'^react$': require.resolve('react'),
'^react-dom$': require.resolve('react-dom'),
},
transformIgnorePatterns: [
'node_modules/(?!(@noble|@scure|ethereum-cryptography|@ethereumjs|uuid|@digitaldefiance/express-suite-test-utils|paillier-bigint|bigint-crypto-utils)/)',
],
};