Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Los globales de jest-preset no están disponibles en las pruebas

Estoy tratando de actualizar jest de v27 a v28. En mis archivos de prueba, cuando intento acceder a GLOBAL_VARIABLE que se especifica en el archivo jest-preset, tengo este error

 ReferenceError: GLOBAL_VARIABLE is not defined

paquete.json

 "jest": "~28.0.0", "ts-jest": "~28.0.0-next.3"

mi archivo jest-preset se ve así

 module.exports = { verbose: true, transform: { '^.+\\.(ts|tsx)$': 'ts-jest/legacy', testEnvironment: 'node', globals: { 'ts-jest': { tsconfig: '<rootDir>/scripts/jest/tsconfig.json', isolatedModules: true, }, GLOBAL_VARIABLE: true }, },

Cuando se ejecuta esto con jest v27, funciona como se esperaba.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!