forked from LedgerHQ/ledger-live-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
67 lines (67 loc) · 2.91 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
export default {
preset: "ts-jest",
globals: {
"ts-jest": {
isolatedModules: true,
},
},
testEnvironment: "node",
coverageDirectory: "./coverage/",
coverageReporters: ["json", "lcov", "clover"],
collectCoverage: true,
coveragePathIgnorePatterns: ["src/__tests__"],
modulePathIgnorePatterns: [
"<rootDir>/benchmark/.*",
"<rootDir>/cli/.yalc/.*",
],
testPathIgnorePatterns: [
"benchmark/",
"tools/",
"mobile-test-app/",
"lib/",
"lib-es/",
".yalc",
"cli/",
"test-helpers/",
],
moduleNameMapper: {
"^@polkadot/metadata/(.*)/(.*)": "@polkadot/metadata/$1/$2.cjs",
"^@polkadot/metadata/decorate$": "@polkadot/metadata/decorate/index.cjs",
"^@polkadot/metadata/(.*)": "@polkadot/metadata/$1.cjs",
"^@polkadot/metadata$": "@polkadot/metadata/index.cjs",
"^@polkadot/networks/(.*)": "@polkadot/networks/$1.cjs",
"^@polkadot/networks$": "@polkadot/networks/index.cjs",
"^@polkadot/types/codec$": "@polkadot/types/codec/index.cjs",
"^@polkadot/types/primitive$": "@polkadot/types/primitive/index.cjs",
"^@polkadot/types/augment$": "@polkadot/types/augment/index.cjs",
"^@polkadot/types/metadata$": "@polkadot/types/metadata/index.cjs",
"^@polkadot/types/metadata/decorate$":
"@polkadot/types/metadata/decorate/index.cjs",
"^@polkadot/types/types$": "@polkadot/types/types/index.cjs",
"^@polkadot/types/(.*)/(.*)": "@polkadot/types/$1/$2.cjs",
"^@polkadot/types/(.*)": "@polkadot/types/$1.cjs",
"^@polkadot/types$": "@polkadot/types/index.cjs",
"^@polkadot/types-known/(.*)": "@polkadot/types-known/$1.cjs",
"^@polkadot/types-known$": "@polkadot/types-known/index.cjs",
"^@polkadot/util$": "@polkadot/util/index.cjs",
"^@polkadot/util-crypto$": "@polkadot/util-crypto/index.cjs",
"^@polkadot/wasm-crypto$": "@polkadot/wasm-crypto/index.cjs",
"^@polkadot/wasm-crypto-asmjs/(.*)": "@polkadot/wasm-crypto-asmjs/$1.cjs",
"^@polkadot/wasm-crypto-asmjs$": "@polkadot/wasm-crypto-asmjs/empty.cjs",
"^@polkadot/wasm-crypto-wasm/(.*)": "@polkadot/wasm-crypto-wasm/$1.cjs",
"^@polkadot/wasm-crypto-wasm$": "@polkadot/wasm-crypto-wasm/data.cjs",
"^@polkadot/x-global$": "@polkadot/x-global/index.cjs",
"^@polkadot/x-randomvalues$": "@polkadot/x-randomvalues/node.cjs",
"^@polkadot/x-textdecoder$": "@polkadot/x-textdecoder/node.cjs",
"^@polkadot/x-textencoder$": "@polkadot/x-textencoder/node.cjs",
"^@polkadot/x-bigint/(.*)": "@polkadot/x-bigint/$1.cjs",
"^@polkadot/x-bigint$": "@polkadot/x-bigint/index.cjs",
"^@polkadot/x-noble-secp256k1$": "@polkadot/x-noble-secp256k1/index.cjs",
"^@polkadot/x-noble-hashes/(.*)": "@polkadot/x-noble-hashes/$1.cjs",
"^@polkadot/x-noble-hashes$": "@polkadot/x-noble-hashes/index.cjs",
},
transformIgnorePatterns: [
"/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)",
],
moduleDirectories: ["node_modules", "cli/node_modules"],
};