Files
zitadel/apps/login/jest.config.ts

20 lines
644 B
TypeScript
Raw Normal View History

2023-06-07 15:34:06 +02:00
import type { Config } from "@jest/types";
import { pathsToModuleNameMapper } from "ts-jest";
import { compilerOptions } from "./tsconfig.json";
2023-05-25 17:11:36 +02:00
2023-06-05 13:02:36 +02:00
export default async (): Promise<Config.InitialOptions> => {
return {
2023-06-07 15:34:06 +02:00
preset: "ts-jest",
2023-06-05 13:02:36 +02:00
transform: {
2023-06-07 15:34:06 +02:00
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "./__test__/tsconfig.json" }],
2023-06-05 13:02:36 +02:00
},
2023-06-07 15:34:06 +02:00
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
2023-06-05 23:27:05 +02:00
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
2023-06-07 15:34:06 +02:00
prefix: "<rootDir>/",
2023-06-05 23:27:05 +02:00
}),
2023-06-07 15:34:06 +02:00
testEnvironment: "jsdom",
testRegex: "/__test__/.*\\.test\\.tsx?$",
2023-06-08 07:19:25 +02:00
modulePathIgnorePatterns: ["cypress"],
2023-06-05 13:02:36 +02:00
};
2023-06-07 15:34:06 +02:00
};