forked from decentralized-identity/veramo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.mjs
65 lines (63 loc) · 1.43 KB
/
jest.config.mjs
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
// import path from "path";
// import { createRequire } from 'module';
//
// const chalkPath = (await import.meta.resolve("chalk"))
export default {
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"jsonld"
],
"collectCoverage": false,
"collectCoverageFrom": [
"packages/**/src/**/*.ts",
"!**/examples/**",
"!packages/cli/**",
"!**/types/**",
"!**/build/**",
"!**/node_modules/**"
],
"coverageReporters": [
"text",
"lcov",
"json"
],
"coverageProvider": "v8",
"coverageDirectory": "./coverage",
"extensionsToTreatAsEsm": [
".ts"
],
"testMatch": [
"**/__tests__/**/*.test.*"
],
"testEnvironment": "node",
"automock": false,
"setupFiles": [
"./setupJest.js"
],
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "$1",
// // https://github.com/facebook/jest/issues/12270#issuecomment-1111533936
// chalk: path.join(chalkPath.split("chalk/")[0], "chalk").substring(5),
// "#ansi-styles": path.join(
// chalkPath.split("chalk/")[0],
// "chalk/source/vendor/ansi-styles/index.js",
// ).substring(5),
// "#supports-color": path.join(
// chalkPath.split("chalk/")[0],
// "chalk/source/vendor/supports-color/index.js",
// ).substring(5),
},
"transform": {
"^.+\\.m?tsx?$": [
"ts-jest",
{
"useESM": true,
"tsconfig": "./packages/tsconfig.settings.json"
}
]
}
}