module.exports = { displayName: 'portal-bff', preset: '../../jest.preset.js', testEnvironment: 'node', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], }, moduleFileExtensions: ['ts', 'js', 'html'], // `jose` ships ESM-only; without an explicit transform exception // ts-jest skips node_modules and Jest fails parsing the import // statements. Listed by name rather than a broad pattern so a // future ESM-only dep is a conscious addition. // // The pattern walks pnpm's deep layout: any path under // `/node_modules/` is ignored UNLESS the path also contains // `jose` somewhere — that catches both the hoisted symlink at // `node_modules/jose/...` and the pnpm-internal real path at // `node_modules/.pnpm/jose@/node_modules/jose/...`. transformIgnorePatterns: ['/node_modules/(?!.*jose)'], coverageDirectory: '../../coverage/apps/portal-bff', };