-
Notifications
You must be signed in to change notification settings - Fork 206
/
jest.config.ts
35 lines (31 loc) · 922 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
33
34
35
import fs from "fs"
import type { Config } from "jest"
const exclude = ["circuits", "contracts"]
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,
setupFiles: ["dotenv/config"],
moduleNameMapper: {
"@semaphore-protocol/(.*)/(.*)": "<rootDir>/../$1/src/$2",
"@semaphore-protocol/(.*)": "<rootDir>/../$1/src"
}
}))
const config: Config = {
projects,
verbose: true,
coverageDirectory: "./coverage/libraries",
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95
}
}
}
export default config