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

194
Views
¿Cómo se puede inicializar una nueva variable llamando a la función constructora en secuencialización-simulacro?

¿Cómo podemos probar la siguiente línea de código usando el simulacro de secuenciación?

 let newUser = new User();

Cuando intenté llamar a la función que contiene esta línea de código, arroja un error que dice que el usuario no es un constructor.

Me estoy burlando del modelo de usuario en mi archivo de prueba de la siguiente manera:

 jest.mock('./../../../models/User', () => { const SequelizeMock = require("sequelize-mock"); const dbMock = new SequelizeMock(); return dbMock.define('User', {}) })
about 4 years ago · Santiago Trujillo
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!