To mock a resolved value of a Promise using Jest, you can use the method ________.

  • mockResolvedValue
  • resolveMock
  • promiseValue
  • mockPromise
In Jest, to mock a resolved value of a Promise, you can use the mockResolvedValue method. This allows you to specify the value that the Promise should resolve with in your test. The other options are not the correct methods for achieving this specific behavior with Promises in Jest.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *