-
Notifications
You must be signed in to change notification settings - Fork 24
/
jest.config.js
29 lines (24 loc) · 1.16 KB
/
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
const path = require('path')
const { createJestConfig } = require('@craco/craco')
// Use jest config created by `craco`
// https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#jest-api
const cracoConfig = require('./craco.config.js')
let jestConfig = createJestConfig(cracoConfig)
jestConfig = {
...jestConfig,
setupFiles: ['<rootDir>/setup.jest.js'],
globals: { ...jestConfig.globals },
testEnvironment: path.resolve(__dirname, 'jest.environment.js'),
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: [
'node_modules/(?!(uuid|axios|@xchainjs/.*|@metaplex-foundation/.*|@ledgerhq/domain-service|@ledgerhq/hw-app-eth|@cosmjs/tendermint-rpc|@bitcoin-js/tiny-secp256k1-asmjs|uint8array-tools)/)'
],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
'@ledgerhq/evm-tools/': '<rootDir>/node_modules/@ledgerhq/evm-tools/lib/selectors',
'@ledgerhq/domain-service/': '<rootDir>/node_modules/@ledgerhq/domain-service/lib/signers',
'@ledgerhq/cryptoassets/': '<rootDir>/node_modules/@ledgerhq/cryptoassets/lib/data/evm'
},
watchPlugins: ['jest-watch-typeahead/filename']
}
module.exports = jestConfig