Question · Angular course · Module 11: Testing

flush()

When do we use flush() instead of tick() in fakeAsync?

Answer options

  • Never, it is the same function
  • When we want to run all pending timers without specifying a time
  • Only for E2E tests
  • When we test Promises

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