// Debian-specific jest configuration.
//
// Upstream ships babel.config.mjs and jest.config.mjs. Debian's jest (29.x)
// loads the babel config synchronously, which fails on a native ESM config
// file. Inline the babel options here with configFile:false instead.
//
// Upstream's globalSetup (prepare-tests.mjs) is also dropped: it shells out to
// "npm install", which is not possible during a Debian build.
module.exports = {
  rootDir: '..',
  moduleFileExtensions: ['ts', 'js'],
  testMatch: ['**/__tests__/(src|dist).*.ts'],
  transform: {
    '\\.[jt]sx?$': [
      'babel-jest',
      {
        configFile: false,
        babelrc: false,
        presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
      },
    ],
  },
};
