Skip to content

Commit a824919

Browse files
committed
Set up backend tests setup
1 parent 427ba16 commit a824919

File tree

7 files changed

+6547
-1402
lines changed

7 files changed

+6547
-1402
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { Config } from "jest";
2+
3+
const config: Config = {
4+
preset: "ts-jest",
5+
moduleNameMapper: {
6+
"\\.(css|scss)$": "identity-obj-proxy",
7+
"^.+\\.svg": "<rootDir>/tests/mocks/svgMock.tsx",
8+
},
9+
// to obtain access to the matchers.
10+
setupFilesAfterEnv: ["<rootDir>/tests/setupTests.ts"],
11+
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
12+
modulePaths: ["<rootDir>"],
13+
testEnvironment: "jsdom",
14+
transform: {
15+
"^.+\\.(ts|tsx)$": [
16+
"ts-jest",
17+
{
18+
tsconfig: "tsconfig.test.json",
19+
},
20+
],
21+
"^.+\\.(js|jsx)$": "babel-jest",
22+
},
23+
};
24+
25+
export default config;

0 commit comments

Comments
 (0)