Testing · Senior · Question 50 of 75
What does await expect(async () => { ... }).toPass() do?
- ✓Correct answer: Retries a whole block (several actions and assertions) until it passes or the timeout ends
- 2Expects the function to throw
- 3Runs the block in a separate worker
Explanation
Useful for eventually-consistent flows, e.g. refreshing until an async job's result appears.