OpenPanel/packages/chakra-ui/jest.config.js
Stefan Pejcic 8595a9f4e5 back
2024-05-08 19:58:53 +02:00

28 lines
846 B
JavaScript

const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig.json");
const paths = compilerOptions.paths ? compilerOptions.paths : {};
module.exports = {
preset: "ts-jest",
rootDir: "./",
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/test/jest.setup.ts"],
testPathIgnorePatterns: ["<rootDir>/node_modules/"],
moduleNameMapper: {
...pathsToModuleNameMapper(paths, { prefix: "<rootDir>/" }),
"\\.css$": "identity-obj-proxy",
},
displayName: "chakra-ui",
transform: {
"^.+\\.svg$": "<rootDir>/test/svgTransform.ts",
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
},
],
},
coveragePathIgnorePatterns: ["<rootDir>/src/index.ts"],
};