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

219
Views
Broma: cuál es la diferencia entre jest.fn() y jest.fn().mockImplementation()
jest.fn(() => 'something') jest.fn().mockImplementation(() => 'something')

¿Hay alguna diferencia entre estos? poco confundido.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No hay diferencia. De los documentos :

mockFn.mockImplementation(fn)

Acepta una función que debería usarse como implementación del simulacro. El simulacro en sí seguirá registrando todas las llamadas que entran y las instancias que provienen de él mismo; la única diferencia es que la implementación también se ejecutará cuando se llame al simulacro.

Nota: jest.fn(implementation) es una forma abreviada de jest.fn().mockImplementation(implementation) .

about 4 years ago · Juan Pablo Isaza Report
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!