forked from privacy-scaling-explorations/zk-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
32 lines (29 loc) · 950 Bytes
/
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
import fs from "fs"
import type { Config } from "@jest/types"
const exclude = ["circuits", "imt.sol", "rollup-plugin-rust", "lazytower.sol", "lazytower.circom"]
const projects: any = fs
.readdirSync("./packages", { withFileTypes: true })
.filter((directory) => directory.isDirectory())
.filter((directory) => !exclude.includes(directory.name))
.map(({ name }) => ({
preset: "ts-jest",
rootDir: `packages/${name}`,
displayName: name,
moduleNameMapper: {
"@zk-kit/(.*)/(.*)": "<rootDir>/../$1/src/$2.ts",
"@zk-kit/(.*)": "<rootDir>/../$1/src/index.ts"
}
}))
export default async (): Promise<Config.InitialOptions> => ({
projects,
verbose: true,
coverageDirectory: "./coverage/libraries",
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95
}
}
})