Put in order · JavaScript and React course · Module 13: Testing React

Fetch mocking syntax

Arrange the elements of the fetch mocking syntax using jest.fn() in the correct order:

Items to put in order

  • })
  • ({ json: () =>
  • = jest.fn()
  • global.fetch
  • .mockResolvedValue
  • Promise.resolve(data)

You can check the correct answer by solving this task in the CodeWorlds game.