/** @type {import('jest').Config} */ export default { preset: 'ts-jest', testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', '^@/(.*)$': '/src/$1', }, resolver: undefined, roots: [''], modulePaths: [''], transform: { '^.+\\.tsx?$': [ 'ts-jest', { useESM: true, tsconfig: { moduleResolution: 'bundler', allowSyntheticDefaultImports: true, esModuleInterop: true, }, }, ], }, transformIgnorePatterns: ['node_modules/(?!@bubblelab/bubble-core)'], modulePathIgnorePatterns: [], globals: { 'ts-jest': { isolatedModules: true, useESM: true, }, }, testMatch: [ '**/__tests__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)', ], collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts', '!src/index.ts'], coverageThreshold: { global: { branches: 70, functions: 70, lines: 70, statements: 70, }, }, setupFilesAfterEnv: ['/src/test/setup.ts'], };