// @ts-check
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("../tsconfig.paths.json");

module.exports = {
    preset: "ts-jest/presets/js-with-babel",
    reporters: ["default", ["jest-junit", { outputDirectory: "../TestResults/", outputName: "spire-junit.xml" }]],
    globals: {
        IS_PRODUCTION: true,
        IS_SERVER_SIDE: false,
        "ts-jest": {
            tsconfig: "../tsconfig.base.json",
        },
    },
    setupFilesAfterEnv: ["./enzyme-setup.js"],
    moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: "<rootDir>/" }),
    testPathIgnorePatterns: ["/node_modules/", "/mobius/", "/spire-linter/"],
};
