OpenPanel/packages/inferencer/jest.config.js

29 lines
881 B
JavaScript
Raw Normal View History

2024-05-08 17:58:53 +00:00
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",
"^antd/es/": "antd/lib/",
},
displayName: "inferencer",
transform: {
"^.+\\.svg$": "<rootDir>/test/svgTransform.ts",
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
},
],
},
coveragePathIgnorePatterns: ["<rootDir>/src/index.ts"],
};