Mimic the behavior of angulars $timeout.flush(). If it is called and there are no changes to be flushed, it should throw an error. The rationale is that calling flush on an empty queue inside a unit tests indicates that the user has a misunderstanding about the current state of his/her application. Rather than silently ignoring it, this should be brought to the users attention.
Mimic the behavior of angulars
$timeout.flush()
. If it is called and there are no changes to be flushed, it should throw an error. The rationale is that callingflush
on an empty queue inside a unit tests indicates that the user has a misunderstanding about the current state of his/her application. Rather than silently ignoring it, this should be brought to the users attention.