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

23 lines
648 B
JavaScript

const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig.json");
const paths = compilerOptions.paths ? compilerOptions.paths : {};
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: "ts-jest",
rootDir: "./",
testEnvironment: "node",
moduleNameMapper: {
...pathsToModuleNameMapper(paths, { prefix: "<rootDir>/" }),
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
},
],
},
testEnvironment: "jsdom",
displayName: "live-previews",
};