module.exports = {
  displayName: 'di',
  preset: '../../jest.preset.js',
  testEnvironment: 'node',
  transform: {
    '^.+\\.[tj]s$': [
      '@swc/jest',
      {
        jsc: {
          target: 'es2022',
          parser: {
            syntax: 'typescript',
            decorators: true,
            dynamicImport: true,
          },
          transform: {
            decoratorMetadata: true,
            legacyDecorator: true,
          },
          keepClassNames: true,
          externalHelpers: true,
          loose: true,
        },
        module: {
          type: 'es6',
        },
        sourceMaps: true,
        swcrc: false,
      },
    ],
  },
  moduleFileExtensions: ['ts', 'js', 'html'],
  coverageDirectory: '../../coverage/unit/di',
  // Lower threshold for new library - container has many edge case branches
  // Coverage will improve as SDK refactoring adds more integration tests
  coverageThreshold: {
    global: {
      statements: 70,
      branches: 55,
      functions: 90,
      lines: 70,
    },
  },
};
