Question · NestJS course · Module 7: Testing

Testing async/await

To test an asynchronous method in Jest, the test should:

Answer options

  • Be synchronous with callbacks
  • Be marked as async and use await
  • Skip waiting for the Promise
  • Use setTimeout()

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