Skip to content

Commit cd88d4e

Browse files
committed
chore: install jest
1 parent a212965 commit cd88d4e

File tree

4 files changed

+9410
-5359
lines changed

4 files changed

+9410
-5359
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
next-env.d.ts
66
.env*.local
77
buttler.db
8+
coverage

jest.config.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { JestConfigWithTsJest } from "ts-jest";
2+
3+
const jestConfig: JestConfigWithTsJest = {
4+
preset: "ts-jest",
5+
moduleDirectories: ["node_modules", "<rootDir>"],
6+
modulePathIgnorePatterns: [
7+
"<rootDir>/.next",
8+
"<rootDir>/dist",
9+
],
10+
moduleNameMapper: {
11+
"^~/(.*)$": "<rootDir>/src/$1",
12+
},
13+
transform: {
14+
"^.+\\.[tj]s$": ["ts-jest", {
15+
tsconfig: {
16+
allowJs: true,
17+
},
18+
}],
19+
},
20+
transformIgnorePatterns: [
21+
"<rootDir>/node_modules/(?!change-case)",
22+
],
23+
collectCoverage: true,
24+
};
25+
26+
export default jestConfig;

0 commit comments

Comments
 (0)