openpanel/packages/live-previews/jest.config.js
Stefan Pejcic 09f9f9502d packages
2024-11-07 19:03:37 +01:00

22 lines
569 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: "./",
moduleNameMapper: {
...pathsToModuleNameMapper(paths, { prefix: "<rootDir>/" }),
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
},
],
},
testEnvironment: "jsdom",
displayName: "live-previews",
};