ts-jest

jest typescript (WARN) Define `ts-jest` config under `globals` is deprecated. Please do transform

ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do
transform: {

: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
},

Возможное решение

Переписать с варианта:

export  default  {
  moduleDirectories: ['node_modules', '<rootDir>'],
  preset: 'ts-jest',
  testEnvironment: 'node',
  extensionsToTreatAsEsm: ['.ts'],
  globals: {
    "ts-jest": {
      "useESM": true
    }
  },
};

НА:

ts-jest The 'import.meta' meta-property is only allowed (typescript) Ошибка, решение

TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.

При это этом tsconfig.json выглядит так:

Subscribe to RSS - ts-jest