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

115
Views
Cómo implementar las pruebas de React Enzyme en Bit Harmony

Estoy tratando de mover una biblioteca de reacción existente a Bit Harmony. La biblioteca original usaba Enzyme para las pruebas. Cuando intento modificar el entorno de demostración my-react para usar enzimas, me encuentro con un problema al especificar la ubicación del archivo setupTests.js.

Modifiqué el archivo jest.config.js ubicado en demo/envs/my-react/jest para que coincida con lo siguiente:

 module.exports = { setupFilesAfterEnv: [ // I have tried multiple variations of the below path '<rootDir>/demo/envs/my-react/jest/setupTests.js', ], };

Luego creé un archivo setupTests.js junto al archivo jest.config.js.

 import { configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; configure({ adapter: new Adapter() });

Con esta configuración, sigo recibiendo el siguiente error cuando ejecuto la prueba, que parece indicar que no se está llamando al archivo setupTests. Enzyme Internal Error: Enzyme expects an adapter to be configured, but found none.

Tenga en cuenta que copiar el código setupTests.js directamente en un archivo de prueba permite que la prueba pase.

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!