generated from Open-Attestation/react-template
-
Notifications
You must be signed in to change notification settings - Fork 14
/
jest.config.js
41 lines (41 loc) · 1.15 KB
/
jest.config.js
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
module.exports = {
testEnvironment: "jsdom",
collectCoverage: false,
collectCoverageFrom: [
"src/**/*.{ts,tsx,js,jsx}",
"scripts/**/*.{ts,tsx,js,jsx}",
"!src/**/*.spec.{ts,tsx,js,jsx}",
"!src/**/*.stories.tsx",
],
coverageDirectory: "<rootDir>/.coverage/",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/_mocks_/fileMock.js",
"\\.(css|sass|scss)$": "identity-obj-proxy",
},
testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)test.[jt]s?(x)"],
testPathIgnorePatterns: ["<rootDir>/node_modules/"],
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
transform: {
"^.+\\.ts?$": [
"ts-jest",
{
useESM: true,
},
],
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
"^.+\\.js?$": "babel-jest",
"^.+\\.jsx?$": "babel-jest",
"\\.(d\\.ts|[jt]sx?)$": "ts-jest",
},
transformIgnorePatterns: [
"node_modules/(?!(nanoid|uuid|@tradetrust-tt/tradetrust|@tradetrust-tt/token-registry)/)",
"node_modules/(?!axios)/",
],
};