import { join } from 'path'; import { fileURLToDirname } from './utils.js'; const dirname = fileURLToDirname(import.meta.url); /** @type {import('ts-jest').InitialOptionsTsJest} */ export default { preset: 'ts-jest/presets/default-esm', globals: { 'ts-jest': { useESM: true, }, }, moduleNameMapper: { '@sophie/(.+)': join(dirname, '../packages/$1/src/index.ts'), '^(\\.{1,2}/.*)\\.js$': '$1', }, resetMocks: true, restoreMocks: true, testEnvironment: 'node', testPathIgnorePatterns: [ '/dist/', '/node_modules/', ], };