Testing · Junior · Question 76 of 78
What does the expect.assertions(n) call guarantee?
- ✓Correct answer: That exactly n assertions ran in the test - useful for async code and callbacks
- 2That the test has no more than n lines
- 3That n tests ran in the file
Explanation
If an assertion inside a callback never runs, the test fails instead of passing silently.