forked from SundaeSwap-finance/sundae-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
63 lines (60 loc) · 1.53 KB
/
Copy pathjest.config.ts
File metadata and controls
63 lines (60 loc) · 1.53 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
56
57
58
59
60
61
62
63
import { JestConfigWithTsJest } from "ts-jest";
export const baseConfig = {
testEnvironment: "node",
testPathIgnorePatterns: ["dist", "node_modules", "__tests__/data"],
extensionsToTreatAsEsm: [".ts"],
transform: {
"^.+\\.[tj]sx?$": [
"ts-jest",
{
useESM: true,
tsconfig: {
target: "esnext",
module: "esnext",
},
},
],
},
transformIgnorePatterns: [
"node_modules/(?!@sundaeswap/cpp|@sundaeswap/asset|@sundaeswap/fraction|@sundaeswap/bigint-math)",
],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^lucid-cardano$": "<rootDir>/node_modules/lucid-cardano",
},
};
const config: JestConfigWithTsJest = {
projects: [
// @ts-ignore Annoying type overloads.
{
displayName: "core",
testMatch: ["<rootDir>/packages/core/*/**/__tests__/**/*.test.*?(x)"],
...baseConfig,
},
// @ts-ignore Annoying type overloads.
{
displayName: "taste-test",
testMatch: [
"<rootDir>/packages/taste-test/*/**/__tests__/**/*.test.*?(x)",
],
...baseConfig,
},
// @ts-ignore Annoying type overloads.
{
displayName: "yield-farming",
testMatch: [
"<rootDir>/packages/yield-farming/*/**/__tests__/**/*.test.*?(x)",
],
...baseConfig,
},
// @ts-ignore Annoying type overloads.
{
displayName: "gummiworm",
testMatch: [
"<rootDir>/packages/gummiworm/*/**/__tests__/**/*.test.*?(x)",
],
...baseConfig,
},
],
};
export default config;